need help with dynamic update of combo boxes

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
HormonX
Forum Commoner
Posts: 50
Joined: Tue Dec 10, 2002 7:43 pm
Location: Toronto

need help with dynamic update of combo boxes

Post by HormonX »

I need some serious help with this :) What i need to accomplish is to dynamicaly update a second pull-down list box after a selection has been made in the first box. I know that this probably will require a JS to interact with PHP but i do not know JS to even begin this. Does anyone have any suggestion and can help me with this.

thank you

Greg
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

as far as i know, which ill admit is not all that much, but i dont think JS(a client side language) can interact with PHP(a serverside language), that is unless you want to use JS to refresh the page when the selection is changed
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Correct Dull,

this would have to include a refresh because php is parsed and then displayed. period. and then waits for the next reload. :)
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

he could though build a multidemensional array in JS that would dynamically update the valuse in the combo boxes with a little work with JS
HormonX
Forum Commoner
Posts: 50
Joined: Tue Dec 10, 2002 7:43 pm
Location: Toronto

Post by HormonX »

I have had few examples of JavaScript with combo boxes but since my knowledge of it is very .. very limited i had trouble integrating php into JavaScript.
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

I did it once without a page refresh but it was horrifically difficult (and pretty slow), so I'd advise going for a page refresh.
Post Reply