This is the sending page (call it send.htm):
Code:
<html>
<head>
<title>javascript variable passing - page 1</title>
</head>
<a href="ss.html?var1=33">Send Variable</a>
</form>
</body>
</html>
This is the receiving page (call it ss.html):
Code:
<html>
<head>
<title>javascript variable passing - page 2</title>
</head>
<body>
<form name="recieve">
<input type="hidden" name="var1">
</form>
<script language="javascript">
var locate = window.location;
document.recieve.var1.value = locate;
var text = document.recieve.var1.value;
function delineate(str) {
theleft = str.indexOf("=") + 1;
theright = str.indexOf("&");
return(str.substring(theleft, str.length));
}
document.write("var1 is " +delineate(text));
</script>
</body>
</html>
Bookmarks