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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

popWin with list box values 1

Status
Not open for further replies.

onressy

Programmer
Mar 7, 2006
421
CA
no to sure why this isn't working, any ideas, Thanks

function OnChange(dropdown){
var SelValue = dropdown.options[dropdown.selectedIndex].value
window.open('startGroup.asp?id='+SelValue+,'mywindow','location=0,status=0,scrollbars=0,width=400,height=250');
return true;
}

////
form is named: f1

<select style="width: 155px;" size="15" name="YG" onchange="OnChange(this.f1.YG);">
 
First, this
Code:
<select style="width: 155px;" size="15" name="YG"
 onchange="OnChange(this.f1.YG);">

can just be this
Code:
<select style="width: 155px;" size="15" name="YG"
 onchange="OnChange(this);">

Second, you have too many plus signs in your window.open method.
Code:
window.open('startGroup.asp?id='+SelValue[b][red]+[/red][/b],'mywindow',
'location=0,status=0,scrollbars=0,width=400,height=250');

If you tried this in Firefox, I'd guess that the Javascript panel would have shown you the error.

If you typed in your code here and didn't copy and paste, please copy and paste so we see exactly what the browser is working with.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top