|
-
Nov 15th, 2004, 10:45 AM
#1
Thread Starter
Addicted Member
[Resolved] JavaScript? : Pop up window variables
Hi,
Basically I would like to know the simplest way of using pop up windows to gather information then feed it back to the parent page?
I am using ASP mainly, but am guessing it's going to involve some JavaScript?!?
Any help gratefully received,
Cheers,
Sparky.
Last edited by Sparky; Nov 16th, 2004 at 07:44 AM.
-
Nov 16th, 2004, 01:10 AM
#2
One way is the InputBox, where the user can enter text values. Another would be to popup a small page in a window and then return the values to the parent page.
Best way has always been to use a form and submit to the same/next page.
-
Nov 16th, 2004, 05:51 AM
#3
Thread Starter
Addicted Member
Thanks
Thanks mendhak,
Do you have any examples of how to use a pop up page in a small window as this would be preferable. Basically I am getting a user to enter data but I dont have space for all the data so I would like to use a pop up form and then put it all into one string before returning it to a field on the parent page.
Is this possible?
Cheers,
Sparky.
-
Nov 16th, 2004, 06:44 AM
#4
Copy paste:
Code:
<html>
<head>
<title>Simple Form</title>
</head>
<body>
<script language="JavaScript">
<!--
function windowOpen() {
var
myWindow=window.open('popup.htm','windowRef','width=200,height=200');
if (!myWindow.opener) myWindow.opener = self;
}
//--></script>
<input name="openPopup" type="button" id="openPopup"
onClick="Javascript:windowOpen();" value="Get Value" />
<form name="form1" id="form1" method="post" action="">
<input type="text" value="" name="output"></input>
</form>
</body>
</html>
THE POPUP FORM (popup.htm)
<html>
<head>
<title>The Popup</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<script language="JavaScript"><!--
function updateOpener() {
window.opener.document.forms[0].output.value =
document.forms[0].inputX.value;
window.close();
}
//-->
</script>
EventId:
<input type="text" name="inputX"></input>
<input name="Close" type="submit" id="Close"
onClick="Javascript:updateOpener()" value="Close"></input>
</body>
</html>
-
Nov 16th, 2004, 07:44 AM
#5
Thread Starter
Addicted Member
Cheers
Thanks very much for that, just what i needed.
Cheers,
Sparky.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|