Welcome visitor
* Login
* Register
It is currently September 15th, 2019, 9:56 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Form that redirects and opens a popup window
PostPosted: November 13th, 2009, 8:37 am 

Posts: 25
Hi, I would like to create a regular form that gets the user name (I know how to do it) but the difference is that I want to redirect to the main page when the form is submited but at the same time open a popup window which says, "Thank you Bob for visiting :)" Can you help me please?
Thanks.


Top
 Profile  
 
  Re: Form that redirects and opens a popup window
PostPosted: November 13th, 2009, 9:51 pm 
User avatar

Posts: 137
It depends on the kind of data you want to retrieve from the user and what you want to do with it. There are many topics on this site that will help you processing the form (I add a list below) and right now I will only tell you how to redirect and open the popup window with the name. If you need more help don't hesitate to ask.

Hmm, I think it would be easier to set the action of your file to the PHP (or ASP, etc.) handler file (as it usually is) and this would be the code in that file:

<?php
extract($_POST);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta HTTP-EQUIV="refresh" content="0;URL=http://www.scriptingok.com">
</head>
<body
onload="nw=window.open('','','width=500,height=200,screenX=400,screenY=100,');
nw.document.write('Thank you <?php echo $name;?> for visiting :D');">
<a href="form redirects and popup.htm">back</a>
</body>
</html>



http://www.scriptingok.com/forum/t5_1038-Send-a-form-to-be-saved-on-my-local-disk
http://www.scriptingok.com/forum/t5_8-Using-a-form-on-HTML
http://www.scriptingok.com/forum/t4_9-Processing-an-HTML-form


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron