PDA

View Full Version : Param Passing



merlyn
01-14-2005, 05:16 PM
Basically here I have a working code to pass Params between the textboxes in the forms. Ive tried several times to have the submission from the first form write on the current document rather than have to be passed to a text feild. I know how to do this via promt boxes and have worked a bit with parent childe window however would just simply like this to write what the person enters to the current page. Several tests have passed the paran to a new location by the ? in the url. I am not sure if this is possible though it seems it should be.

<html>
<head>
<title>Stumped</title>
<script language="javascript">
<!--

//*would like to pass directly to document.

function paramPass () {
var x = document.getTown.town.value

document.getTown.town.value = " "
document.getTown.town.focus()

document.gotTown.sol.value = x
document.gotTown.sol.focus()

}

//-->
</script>
</head>

<body BGCOLOR="white" TEXT="Teal" LINK="Silver" VLINK="Silver">
<font face="" color="">
<form name="getTown">
Town Input: <input type="text" size="20" name="town">

</form>
<input type="button" value="Pass" onClick="paramPass()">

<form name="gotTown">
Town Output: <input type="text" size="20" name="sol" >
</form>


</font>
</body>
</html>

//* That works to pass between text feilds.


So if anyone knows, how can I pass that to write on the document via document.write. Just need ta make sure it passes it to write to the same document. Its a challange for me. Possibly you to.

Thanks.

merlyn
01-14-2005, 05:29 PM
function paramPass () {
var x = document.getTown.town.value

document.write(x)
}



theres my funtion that passes it to another page however I would like it on the same page.