"CHouck" <ch****@voli.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.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=238297&EventID=19080
And I have some Javascript in the page which places the link info into
the URL:
<script language="JavaScript"><!--
function nextpage(href,string) {
location.href = href + '?' + string;
}
</script>
Now on the (disclaimer.html) 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.aspx?CustomerId=238297EventID=1908
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>disclaimer.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.aspx"
page += "?CustomerId=" + valu[0];
page += "&EventID=" + valu[1];
function nextpage() {
location.href = page;
}
</script>
</head>
<body>
<a href="javascript
:nextpage()">I agree</a>
</body>
</html>
Also, if your calling link looks like
<a
href="javascript
:nextpage('http://www/','disclaimer.html?customer=238297&Eve
ntID=19080')">link</a>
why not remove the function by changing it to
<a href="http://www/disclaimer.html?customer=238297&EventID=19080">lin k</a>