Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can one FORM send data to another FORM ???

Status
Not open for further replies.

tshafer

Vendor
Mar 31, 2003
4
US
Somehow via the URL ??? ( No Server CGI,etc)

Like FORM1.htm sends: http:...../FORM2.htm?info1=abc

FORM2 would appear: I got abc. Send:def

FORM3 would appear: I got abcdef.

I hoped Javascript could parse the URL ?
Suggestions welcomed.
 
Yes. You use the Get method instead of post.
You have to parse the URL for field values.
I believe there is a FAQ on it, if not google on javascript parse querystring.



Stamp out, eliminate and abolish redundancy!
 
javascript parse querystring" is the answer !!
Thank you.
My FORM2, FORM3, etc contain..........................

function parseQueryString (str) {
str = str ? str : location.search;
var query = str.charAt(0) == '?' ? str.substring(1) : str;
var args = new Object();
if (query) {
var fields = query.split('&');
for (var f = 0; f < fields.length; f++) {
var field = fields[f].split('=');
args[unescape(field[0].replace(/\+/g, ' '))] =
unescape(field[1].replace(/\+/g, ' '));
}
}
return args;
}
__________________________________________________

<SCRIPT>
var args = parseQueryString ();
for (var arg in args) {
document.write(arg + ': ' + args[arg] + '<BR>');
}
</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top