Sorry for mistakes in the text :)

Here is the right one:

 I have a form and some fields within it. I need to submit this form
by
 onchange event of select element (see the code). But the way I did it
 submits form using regular way - not through Ajax call. If I use
 $ajax->submit(..) to submit this form everything works perfect.
 But I do not need submit button. How can I reach the same effect as
 with $ajax->submit but with select's onchage event. Please advise.

<?php echo $ajax->form('changegender', 'post', array('url' =>
 'changegender', 'update' => 'gender_div'))?>

   <div id="gender_div">

     < -- HERE COME OTHER FIELDS -->

     <?php echo $html->selectTag('Favorite/gender_id' , $genders,
 $favorite['Favorite']['gender_id'], array('onchange' =>
 'this.form.submit()'), null, false ) ?>

   </div>
 </form>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to