I use ajax and it work very well.
<form name="basket" id="panier" method="POST" action="<?php echo $html-
>url('/basket/view') ?>">
....
<?php echo $ajax->submit('Save', array('update' => 'divbasket')); ?>
I need to submit my form with ajax every time a change is used in a
select tag.
$javascriptchange = "????";
echo $html->selectTag('Basket/port_id',
$listport,null,array('onchange'=>$javascriptchange),null,false); ?>
How can i do it?
The javascript generated
<input id="submit7768" type="submit" onclick="event.returnValue =
false; return false;" value="Save"/>
<script type="text/javascript">
1Event.observe("submit7768", 'click', function(event) { new
Ajax.Updater('divbasket','/photoweb//basket/view/33',
{asynchronous:true, evalScripts:true,
parameters:Form.serialize(Event.element(event).form), requestHeaders:
['X-Update', 'divbasket']}) }, false);
</script>
<button type="submit">Save</button>
Can i take this code for my $javascriptchange ?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---