Jump to content

Problem passing variable / loading popup


Kane250

Recommended Posts

I have a page that has a form where someone enters their email address. The submit button launches a popup window which loads a second page that asks for first and last name, and also has the e-mail address field (which should be auto filled from the previous form entry).

 

I'm trying to make sure the second page only loads in the popup window and not the main window, which I have achieved. However, the email address from the first page is not carrying over to the form in the second page.

 

Can someone take a look and see what could be wrong?

 

Thanks!

 

Code for Page 1


<script>
<!--
function wopen(url, name, w, h)
{
w += 20;
h += -20;
var win = window.open(url,
 name,
 'width=' + w + ', height=' + h + ', ' +
 'location=no, menubar=no, ' +
 'status=no, toolbar=no, scrollbars=no, resizable=no');
win.resizeTo(w, h);
win.focus();
}
// -->
</script>


</head>

<body>

<form method="post"/>
<p>	E-Mail Address: <input type='text' value="" name="email" /><br />
<input type='submit' onClick="wopen('mainsub.php', 'popup', 400, 375); return true;" value="Sign Me Up!"/><br />

</form>


 

Code for Page 2

<form method="post" action="mainsub.php" />

<p>	

First name: <input type='text' value="" name="firstname" /><br /><br />

Last name: <input type='text' value="" name="lastname" /><br /><br />

E-Mail Address: <input type='text' value="<?PHP print $emailaddy ?>" name = "email" /><br />

<br />

<input type='submit' value="Submit!" name="submit" /><br />

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.