Jump to content
xisto Community
Sign in to follow this  
karlosantana

Add A Javascript Feedback Form On Your Web Page This is how to do it

Recommended Posts

So i was looking for a feedback form in javascript and i couldn't find one so ive made one for you guys here we go!
So this feedback form will ask for name, emails address and their comments
First of all add this code in between the <head> and </head> tags


<script name="JavaScript"><!-- function SendEmail(){		var toaddy = 'name@domain.com';		var subject = 'JS Form Submission';		var mailer = 'mailto:' + toaddy + '?subject=' + subject + '&body=' + 'Name%20is\n\t' + document.jsform.visitorname.value + '\n\n' + 'Email%20is\n\t' + document.jsform.email.value + '\n\n' + 'Message:\n\n' + document.jsform.message.value +'\n\n';		parent.location = mailer;} // --></script>

Thats the base of it if you havn't got that in it wont work

The next bit goes in between <body> and </body> tags in the position you want it
<form name="jsform"><table><tr><td align="right">Name:</td><td><input name="visitorname" size="27"></td></tr><tr><td align="right">Email:</td><td><input name="email" size="27"></td></tr><tr><td colspan="2">Your message:<br><textarea name="message" cols="31" rows="6" wrap="soft"></textarea><center><p><input type="submit" onClick="SendEmail()" value="Send Message"></center></td></tr></table></form>

And thats it thats all you need! you can customize colours etc.
Hope this helps

Share this post


Link to post
Share on other sites

Yep it does it sends the whole form to the email address you put in it doesn't open up any other screens programs or whatever! its really good actually i use it myself! enjoy using it! im glad it has helped people!

Share this post


Link to post
Share on other sites

Oh, this is great.It's far shorter than the PHP script I did for sending feedbacks, and it doesn't take two different pages.Thanks for this, the only thing I'd have to add is a security feature to avoid bulk spams. =]

Share this post


Link to post
Share on other sites

Well, javascripts are nice however I have found out and this is not the big secret they are making your site run slower that is in some cases when there is real exess of the javascript usage on the page then it is running slowly and may even slower your browser even on the strongest computers. I do not have anything against your script I am certian that is it working all right however there is problem with javascript and I don't like it. P.S. I will stick to the php. :)

Share this post


Link to post
Share on other sites

I could recommend another powerful but commercial solution.The service provides an easy integration (1 line of html code) of instant cross-browser JavaScript customer Feedback Form and Feedback Analytics to websites: http://userthought.com/
Tested on IE6, IE7, IE8, FireFox, Safari and Chrome...It could help you to get better communication with your users.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.