Methos
asked on
Confirmation Page - Form
How can I have a confirmation page to show up after a form has been submitted? I played around with "onsubmit" -- but I want it to show up AFTER the data has been submitted, not right before...
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
An alternative you might like to try is opening up the confirmation page in a new window - note that this is immediate and does not wait for the form to be processed by the server-side script...
<form ... onSubmit="window.open('tha nkyou.htm' ,'ty','wid th=200,hei ght=150,me nubar=0,st atusbar=0' );">
<form ... onSubmit="window.open('tha
Yes....and that is what he asked for james_beilby....
"I want it to show up AFTER the data has been submitted"
But still...what you suggested remains a good suggestion... :)
Max.
"I want it to show up AFTER the data has been submitted"
But still...what you suggested remains a good suggestion... :)
Max.
Hence why it's an "alternative" :-)
Indeed...
Methos > Did our suggestions help you in any way?
Don't hesitate to ask for our help if you need it ok?
Max.
Methos > Did our suggestions help you in any way?
Don't hesitate to ask for our help if you need it ok?
Max.
ASKER
Sorry -- I just got all the suggestions and haven't had time to even read through them all yet! :)
I'm putting the form up on a client's Intranet -- which is very limited in what they allow you do. I may be limited to straight html. I think the company standard desktop is W2k. If this is the case - can I try the .asp? If not, I'll use the alternate 'onsubmit' and tell them I can't get the confirmation page AFTER sending.
I'm going over there later this morning and will test a few things and get back to you.
Thanks!
Methos
I'm putting the form up on a client's Intranet -- which is very limited in what they allow you do. I may be limited to straight html. I think the company standard desktop is W2k. If this is the case - can I try the .asp? If not, I'll use the alternate 'onsubmit' and tell them I can't get the confirmation page AFTER sending.
I'm going over there later this morning and will test a few things and get back to you.
Thanks!
Methos
What matters is the server...is that running on 2000? And if so can't they allow you to send mail through a script? You have to give the advising role and tell them it would work much better that way..
And then even if you cannot process it server-side on your own server, there is still the option I mentioned before of using an external processing script....on an external server....
Which ever suits your needs...
Max.
And then even if you cannot process it server-side on your own server, there is still the option I mentioned before of using an external processing script....on an external server....
Which ever suits your needs...
Max.
Here's another clientside one...
Load the page with the form on ("form.htm") inside a larger frame:
<html>
<head>
<script>
function checkChild(){
if((window.frames[0].locat ion.href). indexOf("s ubmit.asp" )>-1){
window.open("thankyou.htm" ,"ty","wid th=200,hei ght=150,me nubar=0,st atusbar=0" );
clearInterval(processedChe ck);
}
}
processedCheck = setInterval("checkChild()" ,100);
</script>
</head>
<frameset rows="100%,*" border="0" frameborder="no" framespacing="0">
<frame src="form.htm">
</frameset>
</html>
This will launch the thankyou window after the form is submitted (or when submit.asp appears). The line:
window.open("thankyou.htm" ,"ty","wid th=200,hei ght=150,me nubar=0,st atusbar=0" );
could be changed to:
window.frames[0].location. href = "thankyou.htm";
which would then replace the output from the server-side script with the thankyou.htm (or confirmation) page.
Load the page with the form on ("form.htm") inside a larger frame:
<html>
<head>
<script>
function checkChild(){
if((window.frames[0].locat
window.open("thankyou.htm"
clearInterval(processedChe
}
}
processedCheck = setInterval("checkChild()"
</script>
</head>
<frameset rows="100%,*" border="0" frameborder="no" framespacing="0">
<frame src="form.htm">
</frameset>
</html>
This will launch the thankyou window after the form is submitted (or when submit.asp appears). The line:
window.open("thankyou.htm"
could be changed to:
window.frames[0].location.
which would then replace the output from the server-side script with the thankyou.htm (or confirmation) page.
ASKER
Here's how I ended up solving this for now...
<form action="mailto:name@compan y.com?subj ect=re: subject line" method="POST" enctype="text/plain" name="Signup" onsubmit="return checkData()"
function checkData (){
if (document.Signup.Employee_ Name___.va lue == "") {
alert("Please fill in your name.")
document.signup.Employee_N ame___.foc us()
return false}
if... (blah blah blah if statements)
else
{window.location="Thankyou .html"}
and I redirect the user off the Thankyou.html page...
I had to get this up and working today and this seems to work for now. I would like to explore both of your alternatives in the future and both of you helped my getting it done. Is there a way to slip the points?
- Methos
<form action="mailto:name@compan
function checkData (){
if (document.Signup.Employee_
alert("Please fill in your name.")
document.signup.Employee_N
return false}
if... (blah blah blah if statements)
else
{window.location="Thankyou
and I redirect the user off the Thankyou.html page...
I had to get this up and working today and this seems to work for now. I would like to explore both of your alternatives in the future and both of you helped my getting it done. Is there a way to slip the points?
- Methos
Split you mean I guess...yes there is...
Go to community support section of this site...ask them to lower the amount of points here to 50...and then ask a new question in the form:
"Question for <Expert Name> for help on <QID>"
Then you can accept one of our comments here...and the other will have a question with points in his name...
Max.
Go to community support section of this site...ask them to lower the amount of points here to 50...and then ask a new question in the form:
"Question for <Expert Name> for help on <QID>"
Then you can accept one of our comments here...and the other will have a question with points in his name...
Max.
Methos has reuqested a 50/50 points split here. I will refund 50 points to start the split and accept for DreamMaster for 50 points.
Methos, to complete the split, you must open a NEW question in this Topic Area entitled *Points for james_beilby* In the comment box, type *For your help in solving my question #20171387* Then click on the 50 point button and Submit. The split will be complete.
Thanks,
ComTech
Community Support
Methos, to complete the split, you must open a NEW question in this Topic Area entitled *Points for james_beilby* In the comment box, type *For your help in solving my question #20171387* Then click on the 50 point button and Submit. The split will be complete.
Thanks,
ComTech
Community Support
Glad I was able to help...
Cheers,
Max.
Cheers,
Max.
Good job Methos, we are all done here now.
Thanks,
ComTech
Thanks,
ComTech
<form method="post" action="http://www.someperlsite.com/sendmail.pl">
...
...
//These contain your regular form fields...
<input type='hidden' name='followuppage' value='confirm.html'>
</form>
Something like this....there are many of these around....ofcourse you could also choose to play around making your own server side script...for that I would need to know if you are running a UNIX server or a Windows Server...
Cheers,
Max.