Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"something"+this.value 1

Status
Not open for further replies.

simon551

IS-IT--Management
May 4, 2005
249
Hi. I'm trying to use the spry library to accomplish the changing of a dataset dynamically based on a selection in a drop-down. I can do this no problem. Now I'm trying to change 2 datasets based on the selection and running into problems. I think if I could get this little javascript right it would be easy but not sure.
this works:
Code:
<select onchange="dsProj.setURL(this.value); dsProj.loadData(); ">
            <option value="../sources-xml/et_lists.php?itemSetting=1" >Regular </option>
            <option value="../sources-xml/et_lists.php?itemSetting=2" >Overhead </option>
          </select>
I want to modify as so:
Code:
<select onchange="dsProj.setURL("../sources-xml/et_lists.php?"+this.value); dsProj.loadData();" >
            <option value="itemSetting=1" >Regular </option>
            <option value="itemSetting=2" >Overhead </option>
          </select>
which is not working. Is this something that looks to you to be doable?
 
Yours is a nested quotes issue. Try this:

Code:
<select onchange="dsProj.setURL([red][b]'[/b][/red]../sources-xml/et_lists.php?[red][b]'[/b][/red]+this.value); dsProj.loadData();" >

----
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top