Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Select value from one combo to another combo

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Select value from one combo to another combo

Postby expertalert » Sat Nov 17, 2012 3:56 am

Hi ,
i am an occational php programmer currently to a project

and stuck with this requirement .
Basically, there will be 3 combo box, and 2nd combo box will be populated s from the value of first combo and 3rd combo box will be populated from the value of 2nd combobox.

i have found this code from here, its 2 combo box
http://www.c-sharpcorner.com/UploadFile ... er-in-php/

but the problem is, when i am creating a third combo then value always stays from the first combo.

i think i know where is the problem its becasue of "document.frm.submit();"

Can any one please help with this problem ?? what shall i do to get my result ??

Thanks
expertalert
New php-forum User
New php-forum User
 
Posts: 4
Joined: Sat Nov 17, 2012 3:48 am

Re: Select value from one combo to another combo

Postby seandisanti » Mon Nov 19, 2012 2:40 pm

AJAX, Javascript, Jquery. (in this case that's kind of the same answer 3 times, but yeah).

Personally I like jquery, but there are plenty of ways to do what you want with javascript. here's an example from another thread where someone wanted textboxes whose values each changed depending on the values contained within the other. viewtopic.php?f=2&t=21412 you should be able to modify that one to do what you want
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 773
Joined: Mon Oct 01, 2012 12:32 pm

Re: Select value from one combo to another combo

Postby seandisanti » Mon Nov 19, 2012 2:42 pm

Yeah, even in the code you'd linked to, they have the javascript doing the work.
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 773
Joined: Mon Oct 01, 2012 12:32 pm


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.