Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit and Close form (HTML)

Status
Not open for further replies.

Mike12tet

Technical User
Dec 15, 2003
24
NZ
I have a form (html) with send button. I like to include close function, when user click on send button it will sends and close the form (window) too.
Right now when user clicks on send button he will get window "The form is submitted using e-mail.." Yes/No, and then another window "Outlook is sending email on your behalf.. " Yes/No
Is there way to get around all this?
And my last question is: is there way to put date/time stemp when the user fills and sends the information from form.
Thanks for any advise.

Michal
 
>> I have a form (html) with send button.
Do you submit the form, or just send the email?

>> I like to include close function, when user click
>> on send button it will sends and close the form
>> (window) too.


You'll need to use Javascript to close the window, putting a call to [tt]window.close()[/tt] will take care of it as long as it's a window your site has spawned and not one the user has opened themselves.

>> Right now when user clicks on send button he will
>> get window "The form is submitted using e-mail.."
>> Yes/No, and then another window "Outlook is sending
>> email on your behalf.. " Yes/No
>> Is there way to get around all this?


No, otherwise spammers could use hidden emailing links to get you to send email to them - gathering your address.

>> And my last question is: is there way to put
>> date/time stemp when the user fills and sends the
>> information from form.


Yep, again using Javascript. You can put a hidden field on your form (call it "datestamp" or whatever you like) and set it's value in the [tt]onload[/tt] event of the page like so:
Code:
 var nowDate = new Date();
 document.getElementById("datestamp").value = nowDate;


[sub]Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
[/sub]

AU.gif
Check out Tek-Tips Australia New Zealand forum1155
NZ.gif
 
To submit forms and email it you need to use server side scripting. A free utility, but will have adds in it, is: Give it a try, see if it meets your needs. If you are running a comercial site I would not recommend it; however, thats just a personal preference. What types of languages does your hosting company support?
 
Our werbserver supports javascript, but I'm not familiar in it. I'm just learning html and that it is for building this form only. I will appreciate if you can give me some more hints.

Thanks,

Michal
 

Do you mean it supports server-side JavaScript (for example, ASP wrtitten in JavaScript), or do you mean it supports .JS files uploaded to it that run locally on the user's browser?

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top