"CHouck" <ch****@voli.co m> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I have what seems to be a simple problem but I can't figure it out.
I have a page where I have a link with variables built in which I want
to pass through the URL so another page can pick the info up.
My link on the first page (schedule.html) goes to this link:
disclaimer.html ?customer=23829 7&EventID=190 80
And I have some Javascript in the page which places the link info into
the URL:
<script language="JavaS cript"><!--
function nextpage(href,s tring) {
location.href = href + '?' + string;
}
</script>
Now on the (disclaimer.htm l) page I want to receive the info in the URL
and then have a link that says "I Agree" that contains that dynamic
info. So the link would look something like this:
paymentpage.asp x?CustomerId=23 8297EventID=190 8
The problem is I have a no idea how to GET this info into the link.
Any help anyone could give me would be greatly appreciated.
Thanks,
CHouck
Will this work for you? Watch for word.wrap.
<html>
<head>
<title>disclaim er.html</title>
<script type="text/javascript">
var qstr = location.search ;
qstr = qstr.replace(/\?/g,"&");
var pair = qstr.split("&") ;
var valu = new Array("","");
for (var i=1; i<pair.length; i++) {
var parm = pair[i].split("=");
if (parm[0] = "customer") valu[0] = parm[1];
if (parm[0] = "EventID") valu[1] = parm[1];
}
var page = "paymentpage.as px"
page += "?CustomerI d=" + valu[0];
page += "&EventID=" + valu[1];
function nextpage() {
location.href = page;
}
</script>
</head>
<body>
<a href="javascrip t:nextpage()">I agree</a>
</body>
</html>
Also, if your calling link looks like
<a
href="javascrip t:nextpage('htt p://www/','disclaimer.h tml?customer=23 8297&Eve
ntID=19080')">l ink</a>
why not remove the function by changing it to
<a href="http://www/disclaimer.html ?customer=23829 7&EventID=19080 ">link</a>