Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 687

Positive I have a syntax error - onChange redirect to URL

$
0
0
So,

I've got a selection box on my form and when I use the follow onChange code, it works as expected
Code:

<select name = "LocSelect" onChange='location.href="editfilltable.asp?Location="+this.form.LocSelect.options[this.form.LocSelect.selectedIndex].value;'>
The problem I have is that I also need to embed a static "un=" and then an ASP variable strUN to the URL.

So, for example if the original code was straight html the URL would be:
editfilltable.asp?Location=LOCATION1

But I need it/want it to be:

If strUN = testuser

editfilltable.asp?un=testuser&Location=LOCATION1

If strUN = anotheruser
editfilltable.asp?un=anotheruser&Location=LOCATION2

Does this make sense?

I can't seem to get my code to work properly on my classic ASP page, by altering the original working code.

Viewing all articles
Browse latest Browse all 687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>