This is driving me crazy...
I have a URL http://myserver/map.asp?PCode=ABC123" onclick="window.open(this.href);return false;
and want to pass PCode (ABC123) into a text box txtLocation, I can get it in by hardcoding
The snippet of code looks thus:
document.getElementById("txtLocation").value = 'ABC123';
However the parameter will obviously change, I have tried
<% strPostCode = Request.querystring("PCode") %>
document.getElementById("txtLocation").value = strPostCode;
and various different options but cannot get the variable to stick, any ideas?
2 posts • Page 1 of 1
- Posts: 847
- Joined: 24 Jan 2010, 06:35
- Location: A Magic Forest in Deepest, Darkest, Kent