Click here to Skip to main content
15,891,821 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HTML
<html>
<head>
<title>Order Form</title>
<script>
function myWindow() {
	    window.open("SubWindow.html","second",HEIGHT= 200,WIDTH= 100)

	    }
</script>
</head>
<body bgcolor="#FFFFCC">

  Turnshop Corp.
  Order Form


<form name="orderform" method="get" action="" >
<input type="text" name="Total" value="$0" size="7">
<input type="button" value="Go To Invoice" onclick="myWindow()"/>

</form>
</body>
</html>

second page:
HTML
<html>
<head>
    <title>Confirmation</title>
</head>
<body >
    <form >
        Your Request Has Confirmed !
        Your Payment Is:
<input type="text" onChange="opener.document.orderform.Total.value=this.value" />
    </form>

</body>
</html>
Posted
Updated 28-Jan-15 16:32pm
v5
Comments
ZurdoDev 28-Jan-15 8:09am    
What is the question?
Member 11161828 28-Jan-15 22:36pm    
My problem is, the value of Total does not appear in text box in second window
ZurdoDev 28-Jan-15 22:41pm    
You don't have any code to do that.

Um.
You don't think it might help a little if you hooked one of the button events up to the function? These things don't happen by magic...

W3Schools: OnClick event[^]
 
Share this answer
 
Comments
TheRealSteveJudge 28-Jan-15 11:25am    
5*
OriginalGriff is right:

Replace
<input type="button" value="Go To Invoice" />
by
<input type="button" value="Go To Invoice" onclick="myWindow()"/>
 
Share this answer
 
Comments
Member 11161828 28-Jan-15 22:45pm    
still not working
TheRealSteveJudge 29-Jan-15 3:15am    
What is not working?
I tried your current code and the subwindow pops up when pressing the button.
Member 11161828 29-Jan-15 3:27am    
Hi, The SubWindow is confirmation form, I want to pass Total.value of first form to new window.
Member 11161828 29-Jan-15 3:21am    
Hi, I want to move Total.value to SubWindow, this form is confirmation of my order form

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900