Make sure you've properly included the Ajax helper, the RequestHandler
component, and the prototype and scriptaculous libraries as the
documentation explains.

You then need to setup your form to submit via Ajax.   To do this replace
your $form->create tag with $ajax->form as described:
http://book.cakephp.org/view/628/form

You will need to add a value 'update'=>'DIV TO RENDER RESULTS IN'

Your form will now post to the action specified via Ajax and render the
resulting view in the div you've specified in the 'update' option.  I
recommend reading the full documentation on the Ajax helper to get a better
idea of how it works.

On Mon, Nov 16, 2009 at 3:19 AM, Jas <[email protected]> wrote:

> Thanks Amit, thats exactly where I'm upto.
> I've got an array of the options from the select box. but I dont know
> how to send this by ajax.
>
>
> On Nov 16, 6:45 pm, Amit Rawat <[email protected]> wrote:
> > You can create an array in javascript. In that array place all the values
> of
> > the select box.
> >
> >  var t= document.getElementById('your_select_box_id').options;
> >
> > for(var i=0;i<t.length;i++)
> > {
> >   put value in the array
> >
> > }
> >
> > send the array by ajax
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/cake-php?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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=.


Reply via email to