For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > March 2006 > updating form values without submit









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author updating form values without submit
b

2006-03-31, 3:57 am

This seems very simple, but I'm not sure how to do it. Lets say that I
have
a form with two select boxes, call them Colours (red, orange, yellow)
and Items (contents depend on colour selected). If the colour is
changed from orange to yellow, I want the second select box to change
it's contents from "Oranges, etc" to "Bananas, etc" without the submit
button being pressed. How do I do this?

sharma

2006-03-31, 3:57 am

Use javascipt events like onchange(), OnSelect () some thing like that..

b

2006-03-31, 3:57 am

Ok, thanks. I knew that it was possible to do these types of things,
but had not found an example in any PHP book I have read. Found this
website for anyone else interested.

http://www.phpfreaks.com/javascript...l/page/evnt.htm

Jerry Stuckle

2006-03-31, 7:57 am

b wrote:
> Ok, thanks. I knew that it was possible to do these types of things,
> but had not found an example in any PHP book I have read. Found this
> website for anyone else interested.
>
> http://www.phpfreaks.com/javascript...l/page/evnt.htm
>


You didn't find it in a PHP book because you can't do it in PHP.

PHP is server-side, while listbox selection is client-side.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com