I am attempting the simple task of passing a value entered in a form field to the next page so it can be dsplayed in a simple hello message.
THE CODE I HAVE TO CAPTURE THE FORM VARIBALE AND SETUP THE ADDRESS OF THE SECOND PAGE IS:
<head>
<script language="Javascript">
function selectWindow() {
var address
address = "HTMLKITOUTPUT.HTM?searchfor=" +
document.searchcust.searchfor.value
window.open(address,"","HEIGHT=800,WIDTH=1000"
}
</script>
</head>
<body>
Customer Selection
<form name="searchcust" >
<p>Search For <input type="text" NAME="searchfor" value=""
onchange="selectWindow()">
<p>
</form>
</body>
THE SECOND PAGE TO DISPLAY THE MESSAGE IS:
<head>
<meta http-equiv="content-type"
content="text/html;charset=iso-8859-1">
<title>Searching For </title>
<script language="JavaScript">
function showsearch() {
var alertmsg
alertmsg = "We are searching for($searchfor)"
alert(alertmsg)
}
</script>
</head>
<body onLoad="showsearch()" >
<script language="JavaScript" type="text/JavaScript">
var request = new Object();
myname = request.searchfor
</script>
Hello <script language="JavaScript" type="text/JavaScript">document.write(myname)</script>
The second page displays but the result I am getting is that the variable is undefined .
Any ideas AND THANKS !!!
THE CODE I HAVE TO CAPTURE THE FORM VARIBALE AND SETUP THE ADDRESS OF THE SECOND PAGE IS:
<head>
<script language="Javascript">
function selectWindow() {
var address
address = "HTMLKITOUTPUT.HTM?searchfor=" +
document.searchcust.searchfor.value
window.open(address,"","HEIGHT=800,WIDTH=1000"
}
</script>
</head>
<body>
Customer Selection
<form name="searchcust" >
<p>Search For <input type="text" NAME="searchfor" value=""
onchange="selectWindow()">
<p>
</form>
</body>
THE SECOND PAGE TO DISPLAY THE MESSAGE IS:
<head>
<meta http-equiv="content-type"
content="text/html;charset=iso-8859-1">
<title>Searching For </title>
<script language="JavaScript">
function showsearch() {
var alertmsg
alertmsg = "We are searching for($searchfor)"
alert(alertmsg)
}
</script>
</head>
<body onLoad="showsearch()" >
<script language="JavaScript" type="text/JavaScript">
var request = new Object();
myname = request.searchfor
</script>
Hello <script language="JavaScript" type="text/JavaScript">document.write(myname)</script>
The second page displays but the result I am getting is that the variable is undefined .
Any ideas AND THANKS !!!