response page from form mailer
Hello,
Does anyone know if there is a way to set up your form mailer such that it returns the response page in a new, seperate window, rather than just overwriting what is in the window that the form was submitted from? Thanks for any help.
Bob
Abhishek Reddy posted this at 03:41 — 16th July 2001.
He has: 3,348 posts
Joined: Jul 2001
hi bob,
form mailer? do you mean an html form with a submit button [using mailto="[email protected]]? :D
if you do mean that, then i know it's possible.
instead of putting your mailing form on the page, just use an ordinanry form, with a submit button.
use the onClick event to spawn a new window that has a form with hidden fields which grab the corresponding data from the original form. then using document.forms.mailForm.submit() on the onload event, u may have the form submitted, and display the response page in the window.
sorry for not including any details...i have to try it out first....:D
if no one solves your problem soon, i'll post some code to try out.
Bob posted this at 15:01 — 16th July 2001.
They have: 117 posts
Joined: Feb 2000
Abhishek,
Thanks for your reply. I'm not using the mailto:="..." function. I have a form set up on my page with some choices for the user to select using radio buttons. The form is submitted to a formmail perl script which processes the data, and displays a response page. The response page is displayed in the window that the form is in. I was just wondering if there is any way for the response page to be opened in a new seperate window, rather than overwriting what is in the current window. I'm not sure if I'm being clear here or not, but I'm not sure how else to explain it. Thanks again.
Bob
Abhishek Reddy posted this at 05:37 — 17th July 2001.
He has: 3,348 posts
Joined: Jul 2001
hi again bob,
it should still be possible. get you submit button to open a new window which has hidden input fields, which send the information to the perl script. automatically the script should display the response page in the window where the the info was sent from.
so the person selects his/her options from the radio buttons and then clicks "submit", upon which a new window is opened. the hidden input fields grab the data from the form and send them to the perl script, which does the rest. the response page is displayed in the new window becuse the info was sent from there.
i hope thats what u want...
sorry if i cant be of much help.
Bob posted this at 14:42 — 17th July 2001.
They have: 117 posts
Joined: Feb 2000
Abhishek,
Thanks again for your help! It sounds like what I want to do is possible, but I'm not sure how to get it to work. I think I know how to get the submit of the form to open a new window (I assume via an onSubmit function which issues a window.open), but how do I get the data to be submitted to the perl script from the new window. I'm not sure how to make that happen. When the user hits the submit button on the original screen, the will submit the data to the script from that page, correct? How do I get it to be submitted from the new window?
Thanks again!
Bob
NSS posted this at 17:03 — 17th July 2001.
They have: 488 posts
Joined: Feb 2000
Hi,
Usually when someone fill in the details, the Form will be process by the script and return to visitor's browser an acknowledgement assuming you are using Formmail such as:
--------------------------------------------------------------------
Thank You For Filling Out This Form
Below is what you submitted to [email protected] on
Detail ----------
----------
-----------
Tuesday, July 17, 2001 at 12:27:54
---------------------------------------------------------------------
It's a standard reply created by the script.
To your question regarding opening of a new window?
Assuming the following:
i)If you want to redirect someone to another page of you site after filling the details in the form then use:
ii)If you want to change the looks and layout of the acknowledgement reply, then please study the "readme file" on how to change it and add it to you Form for processing by the script.
iii)If you want the reply to open a new window, then add the following to your Form:
This should open a new reply window with the details that the visitor submitted to the script for processing.
Hope this helps.
Bob posted this at 23:04 — 17th July 2001.
They have: 117 posts
Joined: Feb 2000
NSS,
Thanks for the help! The target="_blank" on the tag did the trick of opening a new window for the response from the form mailer. Now my question is this: Is there a way to control the size of that new window? Rather than have it be a full browser window, I would like it to be just a small window (perhaps 300x300 pixels). Any way to do this? Thanks again!
Bob
NSS posted this at 03:34 — 18th July 2001.
They have: 488 posts
Joined: Feb 2000
Hi Bob,
I am not sure how to resize a new window as there seems to be no other options using the [TARGET-"_blank"]that I know of that can be done.
However, I will try to source it and will post it here if I can find it.
Regards,
NSS
Bob posted this at 11:26 — 18th July 2001.
They have: 117 posts
Joined: Feb 2000
NSS,
Thanks for the help!
Bob
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.