John: IT works very well. however I have 2 problems:
1.
view
<?php $value = 'something'; ?>
<select name="select" size="8" onchange="new Ajax.Updater('test',
'/colors/test/' + this.value)">
Gives this error onclick:
Object not found!
The requested URL was not found on this server. If you entered the URL
manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
10/10/06 12:16:18
Apache/2.2.2 (Win32) DAV/2 mod_ssl/2.2.2 OpenSSL/0.9.8b
mod_autoindex_color PHP/5.1.4
If I chage the call to this:
<select name="select" size="8" onchange="new Ajax.Updater('test',
'test/' + this.value)">
it works fine.
2.
How do I access the $value from the controller? it is undefined if I
try to access it..?
Best regards.
Asbjørn Morell.
On Oct 9, 10:49 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Oct 9, 2006, at 2:37 PM, [EMAIL PROTECTED] wrote:
>
>
>
>
>
> > hi.
>
> > How do I make an ajax call from a form like this?
>
> > <form>
> > <select name="select" size="8">
> > <option value="1">Blue</option>
> > <option value="2">Red</option>
> > <option value="3">Orange</option>
> > <option value="8">Yellow</option>
> > <option value="e">Black</option>
> > </select>
> > </form>
>
> > If a user clicks an item, I want to call controller: colors/print
> > (with
> > the value)<select name="select" size="8" onchange=" new Ajax.Updater
> ('divToUpdate', '/colors/print/' + this.value) " >
>
> <div id="divToUpdate">
> <!-- results from /colors/print ends up here -->
> </div>
>
> (off the cuff)
>
> -- John
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---