PDA

View Full Version : Pls help me - Postback form


kid1981
02-22-2005, 11:10 AM
I want to create one Form A: 1 textbox, 1 button
Click button --> open another Form B. Click OK postback 1 value to From A.
pls thanks.

speedracer
02-23-2005, 11:24 PM
hi,
this is not Dynamic Drive script help. i'll move this thread to javascript programming to see if anyone can help.

Kor
02-24-2005, 08:51 AM
try this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script language="JavaScript" type="text/JavaScript">
function showF(){
document.getElementById('d').style.display='block';
}
function passV(fB){
var tA = document.forms['formA'].elements['txtA'];
var tB = fB.elements['txtB'];
tA.value = tB.value;
}
onload=function(){document.getElementById('d').style.display='none'}
</script>
</head>
<body>
<form name="formA">
<input name="txtA" type="text">
<input type="button" value="Open FormB" onclick="showF()">
</form>
<br>
<div id="d">
<form name="formB">
<input name="txtB" type="text">
<input type="button" value="pass value to FormA" onclick="passV(this.form)">
</form>
</div>
</body>
</html>

kid1981
02-27-2005, 10:08 AM
Thanks for help me... thanks ... thanks ... thanks.