(WANT HELP ) onchange listbox, get values in another listbox POSIBLE ?
Posted 01 September 2006 - 12:31 PM
i am having on doudt in my project i am using two list box. If i select category from listbox1 i want to display sub_category in listbox2 without page refresh(it is posible)
i am doing that onchange i pass value to the url then i get the sub_Category throught the GET method
Posted 01 September 2006 - 12:43 PM
Posted 01 September 2006 - 12:49 PM
Posted 01 September 2006 - 02:00 PM
In the url where you send the value do not send only the sub category options but all the selectbox. Instead of returning something like
return something like
<select id="sub_cat" name="sub_cat"> <option value="option1">option1</option> <option value="option2">option2</option> <option value="option3">option3</option> </Select>
and then all you have to is to sub_cat_location.innerHTML = ro.responseText and you are done.
If you do not use xmlhttprequest to the same but instead of assigning ro.responseText, assign the string variable you use for the listing or whatever you use
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users