rajmohan Posted September 1, 2006 Share Posted September 1, 2006 Hai guy 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 methodHelp me Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 1, 2006 Share Posted September 1, 2006 Use javascript for this. There are few scripts like this over at dynamicdrive.com Quote Link to comment Share on other sites More sharing options...
rajmohan Posted September 1, 2006 Author Share Posted September 1, 2006 i cannot find over there is there any way to solve this problem Quote Link to comment Share on other sites More sharing options...
radalin Posted September 1, 2006 Share Posted September 1, 2006 well I assume you use XMLHTTPReqeust object for getting the sub_category box.In the url where you send the value do not send only the sub category options but all the selectbox. Instead of returning something likeoption1,option2,optionsreturn something like[code=html]<select id="sub_cat" name="sub_cat"><option value="option1">option1</option><option value="option2">option2</option><option value="option3">option3</option></Select>[/code]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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.