<HTML>
<TITLE> Client Information</Title>
<head>
<script type="text/javascript" src="cookie.js">
<!--HIDE FROM INCOMPATIBLE BROWSERS
function addValues()
{
var txtValues
txtValues = document.justcuz.firstName.value;
txtValues = txtValues + document.justcuz.lastName.value;
txtValues = txtValues + document.justcuz.occupation.value;
return txtValues;
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</script>
</head>
<body>
<form name="justcuz" action="ServerQueryString.html?txtValues"" onsubmit="addValues()">
<p>First Name <input type="text" name="firstName"/><br />
Last Name <input type="text" name="lastName"/></p>
<p>Occupation<input type="text" name ="occupation"/></p>
<p><input type="submit" /></p>
</form>
</body>
</html>
<HTML>
<title>Server Program</title>
<head>
</head>
<body>
<form name="justcuz" action="" onsubmit="">
<p>First Name <input type="text" name="firstName"/><br />
Last Name <input type="text" name="lastName"/></p>
<p>Occupation<input type="text" name ="occupation"/></p>
<p><input type="submit" /></p>
</form>
<script LANGUAGE="Javascript">
<!--
function replace(string,text,by)
{
// Replaces text with by in string
var i = string.indexOf(text), newstr = '';
if ((!i) || (i == -1))
return string;
newstr += string.substring(0,i) + by;
if (i+text.length < string.length)
newstr += replace(string.substring(i+text.length,string.length),text,by);
return newstr;
}
var passed = replace(replace(location.search.substring(1),"+"," "),"=","&");
function split(string,text)
{
var strLength = string.length, txtLength = text.length;
if ((strLength == 0) || (txtLength == 0)) return;
var i = string.indexOf(text);
if ((!i) && (text != string.substring(0,txtLength))) return;
if (i == -1)
{
splitArray[splitIndex++] = string;
return;
}
splitArray[splitIndex++] = string.substring(0,i);
if (i+txtLength < strLength)
split(string.substring(i+txtLength,strLength),text);
return;
}
// -->
</script>
<script LANGUAGE="Javascript1.1"><!--
function split(string,text)
{
splitArray = string.split(text);
splitIndex = splitArray.length;
}
//-->
</script>
<script LANGUAGE="Javascript">
<!--
var splitIndex = 0, splitArray = new Object();
split(passed,'&');
for (var i=0; i < splitIndex; i=i+2)
{
if (splitArray[i] == 'firstName')
document.justcuz.firstName.value = (splitArray[i+1]);
if (splitArray[i] == 'lastName')
document.justcuz.lastName.value = (splitArray[i+1]);
if (splitArray[i] == 'occupation')
document.justcuz.occupation.value = (splitArray[i+1]);
}
//-->
</SCRIPT>
<A HREF="ClientQueryString.html">Return to data entry page.</A>
</body>

New Topic/Question
Reply



MultiQuote




|