Page 1 of 1

drop down problem

Posted: Sun Jun 18, 2006 4:51 am
by leewad
Hi

I have a combo drop down box which changes the content of one drop down depending on the select of the other, to change this the code is

Code: Select all

<select name="area" size="1" onChange="redirect(this.options.selectedIndex)">
is there a way i can do it with php without having to select it manually? like once the page has loaded etc?

Posted: Tue Jun 20, 2006 12:54 pm
by RobertGonzalez
I don't think so. PHP is a server-side language. What you want is done on the client-side, so you are going to be wanting JavaScript type technology.

Posted: Tue Jun 20, 2006 4:04 pm
by jonra
Everah is right... once the page is loaded, PHP is done being interpreted and you'd have to reload the page to do this. I usually use a combo of JavaScript and PHP together to get functionality out of select boxes.