create a js function "getSelected()" --this would be a simple "return
document.getElementById(***).value"
get your updater url to be " \'ships?variable=\'+getSelected() "
Hope that helps
On Mar 5, 8:21 am, "lukemack" <[EMAIL PROTECTED]> wrote:
> hi,
>
> i am trying to make the contents of one drop-down box dependent on the
> contents of another using AJAX (prototype.js) in cake 1.1.13.
>
> I have it working so that a new dropdown appears when i select a value
> in the first dropdown:
>
> <?php echo $html->selectTag('Review/cruiseline', $cruise_lines, null,
> array('onchange'=>'new Ajax.Updater(\'test\', \'ships?variable=12\',
> { method: \'get\' }, {asynchronous:true, evalScripts:true});'), null,
> true, false);?>
>
> In my controller, I am just getting the value of 'variable' from the
> $_GET super global but I obviously want that value to be dynamic and
> equal to the value selected in the dropdown.
>
> So the missing piece is passing the selected dropdown value to the
> controller. Anyone know how to do that?
>
> thanks,
>
> lukemack.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---