php-general Digest 22 Sep 2013 13:12:45 -0000 Issue 8372
Topics (messages 322142 through 322143):
Re: jquery fill select option value
322142 by: Ashley Sheridan
322143 by: Jim Giner
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
iccsi <inu...@gmail.com> wrote:
><select id="mark" name="mark">
> <option value="">--</option>
> <option value="bmw">BMW</option>
> <option value="audi">Audi</option>
></select>
>
>I use above code to have my select drop down on the form and would like
>to
>use jQuery to fill option value on change event.
>I would like know is it possible to do, if yes, any hint or example
>code at
>server site is appreciated,
>
>Your help and information is great appreciated,
>
>Regards,
>
>Iccsi,
Yes it is possible but a) not at server side because JavaScript is run on the
browser, and b) this is a PHP list not a JavaScript list.
Saying that, why aren't you populating it on the server side with PHP?
Thanks,
Ash
--- End Message ---
--- Begin Message ---
On 9/22/2013 3:52 AM, Ashley Sheridan wrote:
iccsi <inu...@gmail.com> wrote:
<select id="mark" name="mark">
<option value="">--</option>
<option value="bmw">BMW</option>
<option value="audi">Audi</option>
</select>
I use above code to have my select drop down on the form and would like
to
use jQuery to fill option value on change event.
I would like know is it possible to do, if yes, any hint or example
code at
server site is appreciated,
Your help and information is great appreciated,
Regards,
Iccsi,
Yes it is possible but a) not at server side because JavaScript is run on the
browser, and b) this is a PHP list not a JavaScript list.
Saying that, why aren't you populating it on the server side with PHP?
Thanks,
Ash
Not sure what you are asking. With PHP it is possible to have a specifi
item from the options selected in the drop down when the page is loaded.
With JS it is possible to capture the newly selected option value and
place it in another field, if that is what you want. Obviously when the
user clicks on an option, that value IS placed in the select tag for
processing at the server side by PHP on submit.
So what is it you want to accomplish?
--- End Message ---