Re: Passing MULTIPLE values using URL string
- From: Richard Hijdra <internetadresis@xxxxxxxxxx>
- Date: Sun, 30 Sep 2007 12:56:26 +0200
Is this for sending the data? That works, only distracting not...Response.Redirect("bedankttr.htm?Trouwdd=" +
encodeURIComponent(Trouwdd.Value) +
"&Naam=" + encodeURIComponent(Naam.Value));
http://www.safalra.com/programming/javascript/get-data/
Then adjust the code in bedankttr.htm accordingly to extract (and
decode) the two values.
You can then use window.location.get.Trouwdd and window.location.get.Naam.
I have putted in
<script type="text/javascript">
function initialiseGetData(){
window.location.get = new Object();
if (window.location.search && window.location.search.length > 1){
var getDataArray =
window.location.search.substr(1).replace('+', ' ').split(/[&;]/g);
for (var i = 0; i < getDataArray.length; i++){
var keyValuePair = getDataArray[i].split('=');
window.location.get[unescape(keyValuePair[0])]
= keyValuePair.length == 1
? ''
: unescape(keyValuePair[1]);
}
}
}
</script>
In the <HEAD> of the destination page
and
<!--
newVar=location.search;
document.write(window.location.get.Trouwdd);
//-->
in the <BODY> of it, but doesn't seem to work...
The string looks like
http://www.rhi.nl/contact/bedankttr.htm?Trouwdd=01-02-03&naam=Richard
Richard.
.
- Follow-Ups:
- Re: Passing MULTIPLE values using URL string
- From: timsamshuijzen
- Re: Passing MULTIPLE values using URL string
- References:
- Re: Passing MULTIPLE values using URL string
- From: timsamshuijzen
- Re: Passing MULTIPLE values using URL string
- From: Safalra (Stephen Morley)
- Re: Passing MULTIPLE values using URL string
- Prev by Date: Re: Rhino: Script runs from command line, but not from browser
- Next by Date: Re: Passing MULTIPLE values using URL string
- Previous by thread: Re: Passing MULTIPLE values using URL string
- Next by thread: Re: Passing MULTIPLE values using URL string
- Index(es):
Relevant Pages
|