Tim
Sat May 06 18:42:41 CDT 2006
Try this:
<script>
function GetQSVal(pName) {
var qString = unescape(top.location.search.substring(1));
var pairs = qString.split(/\&/);
for (var i in pairs) {
var nameVal = pairs[i].split(/\=/);
if(nameVal[0]==pName) return nameVal[1];
}
return "";
}
function popText(){
var v = GetQSVal("paramName");
document.getElementById("idTextInput").value = v;
}
</script>
<body onload="popText();">
....
Tim
"bobdydd" <reallyuseful2004@yahoo.co.uk> wrote in message news:1146951326.718945.254640@y43g2000cwc.googlegroups.com...
> Hi Marcello
>
> I am not too familiar with javascscipt yet but I have found this coding
> that almost does what I want but I am not fluent enough with javascript
> to achieve the effect I want.........which is to have a text box on the
> form which receives the # 1234-54321 from
> the
http://localhost/index.htm?paramName=1234-54321...Url
>
> Thanks for the prompt reply
>
> Bob
>
> <html>
> <head>
> <title>Test</title>
> <script>
> function parseGetVars() {
> var getVars = new Array();
> var qString = unescape(top.location.search.substring(1));
> var pairs = qString.split(/\&/);
> for (var i in pairs) {
> var nameVal = pairs[i].split(/\=/);
> getVars[nameVal[0]] = nameVal[1];
> }
> return getVars;
> }
> </script>
> </head>
>
> <body>
> <script>
> var g = parseGetVars();
> for (var i in g)
> document.writeln(i+'='+g[i]+'<br>');
> </script>
>
> </body>
> </html>
>