Hi

Well, a button usually has no value because it is a button and not a input. I suggest to simply add a hidden input-field to the form containing your row-ID and submit again.

If i am wrong about the false attribute then make sure that your application is serializing the form data properly.. But i really suggest to use hidden fields for this (semantics).

I dont know which ajax framework you are using but for prototype.js it will be most likely the case that the js-function "Form.serialize" is ignoring button-elements and thus the data is not posted to the action.

Regards,
Kjell aka m3nt0r.

2006/10/7, Nathan Garza <[EMAIL PROTECTED]>:

Any one know if you can't use a button element to submit an ajax form?
I have a series of button elements, each containing an image.  When I
click on one of the buttons, I want it to submit the form, using the
value of the button element.  My button tags look like this:

<button type="submit" name="data[Image][id]"
value="<?=$row['id']?>"><?=$pic?></button>

When I use this set up with a normal form, it works just fine.  When I
try it with an ajax form, the form is submited, but it doesn't submit
any data (ie, it ignors the button's value attribute.) Origionally I
thought that maybe my controller code was to blame, but the fact that
no post data is being sent is making me think otherwise.  Any one have
any ideas?

--

Nathan Garza

AshLeaf Media | owner
_________________________________________________________
www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to