Hi,
The way browsers work means the page has to be submitted.
But, you can submit to a popup by adding:
to your <form> tag.HTML Code:target="_blank"
Your good_url page could then have JavaScript to automatically close the window.
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
I have a page that has a drop down window for visitors to request that a PDF file be emailed to them. Everything is working fine (http://www.quorumassociates.com/articles_testing2.html) but upon completion of the form the page changes to a good_URL page.
I really would like for it to redirect to a pop up confirmation that the info was sent which would then just disappear (http://www.quorumassociates.com/requestReceived.html)
Is there any way to achieve this?
Hi,
The way browsers work means the page has to be submitted.
But, you can submit to a popup by adding:
to your <form> tag.HTML Code:target="_blank"
Your good_url page could then have JavaScript to automatically close the window.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
I had tried that but couldn't get it to work. I was including it in the good_URL code. I'll try it in the <form> tag.
Last edited by Jann; 08-May-2009 at 01:03 AM.
I'm getting it into a new tab in the browser window, but not a pop up. Suggestions? Here's what I've got:
<form method="post" action="http://www.quorumassociates.com/quorumfm.php" target="_blank" name="ContactUs">
I have it! Here's what i did.
In the <head> tag:
<SCRIPT TYPE="text/javascript">
<!--
function popupform(myform, windowname)
{
if (! window.focus)return true;
window.open('', windowname, 'height=250,width=500,scrollbars=no');
myform.target=windowname;
return true;
}
//-->
</SCRIPT>
In the <body> tag:
<form method="post" action="http://www.quorumassociates.com/quorumfm.php" onSubmit="popupform(this, 'join')" name="ContactUs">
<input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">
<input type="hidden" name="good_url" value="http://www.quorumassociates.com/requestReceived.html" />
Works like a charm!
Here it is live (well in testing, 'til client approves): http://www.quorumassociates.com/articles_testing2.html
Hi,
That's great. Good code to have in this section - thanks for posting it.
I'll make your thread sticky because it will be useful to others.
The only downside is that it needs JavaScript to work.
Russell Robinson - Author of Tectite FormMail and FormMailDecoder
http://www.tectite.com/
Glad to help. I hate when people post their questions w/o giving us a clue how they finally solved it.
The javascript is a downside, but I do think it's an elegant solution. And thanks for the awesome form script!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks