I have created a draggable item using "draggable" from the Js Helper ($this->Js->draggable) I'm trying to pass data related to the item to the javascript function that is handling the "drop" event related to that item. The code for that looks like this:
$this->Js->draggable(.... Drop=>onDrop, ..... data=>array('brand'=>$carBrand, 'model'=>$carModel) ) with results in JQuery code that looks like this in the javascript code that CakePHP generates and outputs in the buffered javascript file: ("div_1").draggable({containment: "#content", data: {"brand":"Chrysler", "model":"Sebring"), ... So the data is there in the generated javascrip call. Howevever, I can't find a way to get to it once it is dropped in a $this->Js- >droppable element. I've tried accessing it by calling: var brand = ui.draggable.data("brand"); in the onDrop function in my javascript code, but it is undefined. Reading the JQuery API, there is a way to set data using "data", but I can't get CakePHP to work with it, so the question is itthis possible to send user defined data to javascript via a JQuery call. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php