form trouble
I am creating a html form (that opens in a new browser window, separate from the rest of the site), and wanting to send the information from it to an e-mail address, as well as to display a thank you page with a close button. This close button would close this browser window, leaving the user with the first browser window they were viewing before going to the form.
By the way, I have NO programming experience.
I am not using a CGI script, just a mailto action.
The way I have done it so far, is that the (javascript) validation gets done in the first file - the form (inside the submit tag, using onClick) and that works fine.
The next thing is that the action for this page is the name of the "thank you page", so in my case confirm.asp
(the reason why it is asp is because I was following a dreamweaver tutorial that told me to do that, I will come back to this later)
This page also contains a form, but all the fields are hidden (THIS is where I think my problem lies - I have not worked with hidden fields before and because I am not using cgi, I think I have not connected the two forms together, so the information is not being transferred across correctly - I assume something to do with DATA BINDING - this is where I could no longer follow the dreamweaver tutorial - I don't have UltraDev)
e.g. <input type="hidden" name="name" value=%=Request.Form("name")%>
In the example above, this is taken from confirm.asp (the thank you page), "name" is the name of the field in the first form (assessment.html), but I don't know where to state that the value of this field is to be taken from the form "assessment.html".
So the following happens:
- When you click submit on the first form, you are taken to a thank you page
- When you click OK on the thank you page, the info from the first form is sent to a specified e-mail address.
Problem#1:
The information is not being sent across to the 'thank_you' page (e.g. if I enter Peter in the name field, the value Peter is not sent to the thank you page; and therefore, not sent in the email)
Due of the same reason, I think, the e-mail (end info) is not arriving in the same format as it did previously (when not going through the thank you page) - instead it is a blank e-mail with an .ATT attachment that contains all the names of the fields but NOT the information entered in them.
Problem#2:
After this information is sent through to the e-mail address, the user is still left looking at the thank you page (and if they click on OK again - they send the info AGAIN), so I need for this window to close. Ideally, it should close when the person clicks OK (the same time the info gets sent via e-mail). I am not sure if this is possible. If not, I am not sure, if I could do something like close it a # of seconds after OK is clicked.
This seems like a simple enough thing - most sites have this:
1. Fill in
2. Thank You
3. Close
But for some reason - it has all become too complicated for me. I do not need a confirmation page (showing the user info they have entered), just a thank you (so they know it was sent).
I am more than happy to send you the two files (the .html and the .asp) to have a look at, just let me know!!!!
Any help on how to solve this or suggestions about a simpler way of doing this, are more than welcome!!!
Suni
|