Try the following in your view rather than $ajax->submit("Submit",
$options); :
// create a normal options array and then add the following
$options['with'] = 'Form.serialize(Event.element(event).form)';
$options['onclick'] = "return false;";
$options['id'] = 'submit' . intval(rand());
$form->submitImage('img_filename', $options)
. $javascript->event('"' . $htmlOptions['id'] . '"',
'click', $ajax->remoteFunction($options));
Just ripped most of it from the AjaxHelper::submit().
BTW I have not tested this.
Geoff
--
http://lemoncake.wordpress.com
On Jul 18, 3:58 pm, auyongtc <[EMAIL PROTECTED]> wrote:
> I'm stumped facing the same issue too - anyone can help with some
> baking soda?
>
> Cheers,
> Au Yong
>
> On Jul 16, 12:12 am, "Casper F." <[EMAIL PROTECTED]>
> wrote:
>
> > Hello,
>
> > I have just been getting more acquainted with Cake in the last couple
> > of weeks - it is quite a difference to being used to code everything
> > by foot. I am looking for a workaround to be able to use Image-Submit-
> > Buttons to initiate AJAX calls.
> > In the API Description (1.2.x Alpha) it mentions I can pass on
> > options. I tried passing on a value for "src" and "type = image", but
> > that does not produce the requested result.
>
> > Is there a workaround so that I can use the AJAX Helper's submit()
> > function with an image, instead of a standard submit button?
>
> > Thanks
> > Casper
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---