Thanks for the info, makes a lot of sense. Button elements in theory are cool because they can be both. Unfortunately, the reality is really quite a let down. In the end I found that buttons are probobly not going to work, even if I resolved this issue. I decided to go with ajaxified links instead.
On 10/7/06, Kjell Bublitz <[EMAIL PROTECTED]> wrote: > 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 > > > > > > > > > > > > > -- Nathan Garza AshLeaf Media | Director of Technology Innovations _________________________________________________ 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 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 -~----------~----~----~----~------~----~------~--~---