Why are you using ?var1=$hiddenFieldId? Why not just use:
'url' => '/purchases/addGuestToTable/'.
$hiddenFieldId.'/'.draggedid.element.id
Then in your purchases controller:
function addGuestToTable($hiddenFieldId, $draggedId){
//Do what you want.
}
Hope that helps,
Nick
On Mar 26, 5:08 am, Bailey <[email protected]> wrote:
> Hi all, I've searched the google group and unfortunately cant find any
> info on this (or anywhere for that matter)..
>
> I'm trying to send PHP variables over an ajax dropRemote request but
> the action thats meant to be recieving the parameters is not picking
> it up.
>
> Basically I am trying to drag people that are trying to book a seat at
> a dinner dance, you have a pool of names of your guests and you drop
> them onto the table position, in turn i'm trying to get a hidden field
> using a mix of id's from the given table position and the guest id.
>
> The guest id is the same as the element.id from the dragged element.
> The hidden field id is the id of the hidden form element that will
> store the guests table position data.
> Div Id is the div that will show the guests name
>
> I'm trying to send the hidden field along with the dragged element id
> in the ajax request but it wont work.. i've tried the following:
>
> //First try:
> echo $ajax->dropRemote($divId,null,array('url' => '/purchases/
> addGuestToTable/',
> 'with'=>'{draggedid:element.id,
> hiddenField:'.$hiddenFieldId.'}',
> 'update'=>$divId));
>
> //Second try:
> echo $ajax->dropRemote($divId,null,array('url' => '/purchases/
> addGuestToTable/'.$hiddenFieldId,
> 'with'=>'{draggedid:element.id}',
> 'update'=>$divId));
>
> //Third try:
> echo $ajax->dropRemote($divId,null,array('url' => '/purchases/
> addGuestToTable/'?var1='.$hiddenFieldId,
> 'with'=>'{draggedid:element.id}',
> 'update'=>$divId));
>
> I've tried a mix of combinations but it just doesnt want to send a php
> variable over my parameters.. i'm using print_r($this->params) to see
> what the methods getting as well but the only one it finds is
> draggedid...
>
> Can anyone help on this?
>
> Kind regards,
> Bailey
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
To unsubscribe from this group, send email to
cake-php+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.