Canman2005 Posted May 23, 2010 Share Posted May 23, 2010 Hi all I have the following code <select name="items[]" onChange="scriptloader(content.php?thisid='+this.value,'loadingarea');"> <option value="23">Apple</option> <option value="11">Microsoft</option> <option value="4">Google</option> </select> <span id="loadingarea"></span> Basically when something is selected from the drop down list, it passes the selected value through to a script and loads it within the "loadingarea" SPAN tags. So for example, if Microsoft is selected, then it loads the URL content.php?thisid=11 Into the "loadingarea" SPAN tags. This all works fine. My problem is that I have lots of the above code on one page, so my page can look like <select name="items[]" onChange="scriptloader(content.php?thisid='+this.value,'loadingarea');"> <option value="23">Apple</option> <option value="11">Microsoft</option> <option value="4">Google</option> </select> <span id="loadingarea"></span> <select name="items[]" onChange="scriptloader(content.php?thisid='+this.value,'loadingarea');"> <option value="23">Apple</option> <option value="11">Microsoft</option> <option value="4">Google</option> </select> <span id="loadingarea"></span> <select name="items[]" onChange="scriptloader(content.php?thisid='+this.value,'loadingarea');"> <option value="23">Apple</option> <option value="11">Microsoft</option> <option value="4">Google</option> </select> <span id="loadingarea"></span> Basically I have a script to duplicate the block of code, so that multiple drop downs can be added to the same page. The problem is, that because I sometimes have multiples of this block of this code, when I select something from the 2nd or 3rd drop down list, it loads their URL into the 1st "loadingarea" SPAN tag. Is there a way to tell scriptloader(content.php?thisid='+this.value,'loadingarea') that it should be loading its content into the SPAN tag below the drop down that is currently being selected from? If that makes any sense Been trying different options all day, and cannot find a solution. Please help Thanks all Dave Quote Link to comment Share on other sites More sharing options...
Canman2005 Posted May 23, 2010 Author Share Posted May 23, 2010 Any ideas anyone? 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.