Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-05-2004, 04:14 PM
WebProWorld New Member
 

Join Date: Dec 2003
Location: Atlanta, GA
Posts: 21
studionews RepRank 0
Default desperately need help with code

Hello,
Can someone help me with the code for my form? I'm trying to create a feedback form that my visitors would complete as they exit my site. I would like the form data to be sent to me via email. For some reason the email is not functioning properly. I'm not sure what I'm missing or doing wrong. Thanks in advance!
Here's the code I have set up so far...

<form name="feedback" method="post" action="mailto:customerservice@thestudionextdoor.c om" onSubmit="this.mail; ReadForm (this);">
<p class="style3"><span class="style6">Did you find our website to be easy to navigate through?</span>
<select name="select" size="1">
<option value="Definately Easy" selected>Definately Easy</option>
<option value="Somewhat Easy">Somewhat Easy</option>
<option value="Not Easy at all">Not Easy at all</option>
</select>
</p>
<p class="style3">Did you find our selection of photography and prices to be competitive with other online galleries?
<select name="select2" size="1">
<option value="Great selection, great prices" selected>Great selection, great prices</option>
<option value="Competitive selection, competitive prices">Competitive selection, competitive prices</option>
<option value="Not enough selection, prices too high">Not enough selection, prices too high</option>
</select>
</p>
<p class="style3"> <span class="style6">Please list the reasons you didn't purchase from our website today?</span>
<textarea name="textarea2" cols="25" rows="1">Please be specific...</textarea>
</p>
<p class="style3"> What would you like to see or what suggestions do you have about the website?
<textarea name="textarea" cols="50" rows="2">Please list your suggestions here...</textarea>
</p>
<p align="center"><span class="style3">Thank you for your suggestions! Please click the SUBMIT button below and your suggestions will be evaluated by our team as they are received. If you have further questions or concerns please contact us by phone at 404.664.3227 or via email customerservice@thestudionextdoor.com.</span></p>
<p align="center">
<input type="submit" name="Submit" value="Submit">
</p>
</form>
__________________
Heidi Jeannae Schaefer
studionews@thestudionextdoor.com
www.thestudionextdoor.com
Reply With Quote
  #2 (permalink)  
Old 01-05-2004, 04:27 PM
WebProWorld Veteran
 

Join Date: Nov 2003
Location: Castle Rock, CO
Posts: 494
Corey Bryant RepRank 0
Default

What is
Code:
onSubmit="this.mail; ReadForm (this);"
doing? If I take that out - it seems to work. Of course, the user will require an e-mai client installed on the computer.
Reply With Quote
  #3 (permalink)  
Old 01-05-2004, 04:33 PM
WebProWorld New Member
 

Join Date: Dec 2003
Location: Atlanta, GA
Posts: 21
studionews RepRank 0
Default

Thanks. I took the code: onSubmit="this.mail; ReadForm (this);" out of the form but I still cannot get the data to send via email when I test. Do you have any other suggestions to make this work?
__________________
Heidi Jeannae Schaefer
studionews@thestudionextdoor.com
www.thestudionextdoor.com
Reply With Quote
  #4 (permalink)  
Old 01-05-2004, 04:35 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Quote:
Originally Posted by Corey Bryant
What is
Code:
onSubmit="this.mail; ReadForm (this);"
doing? If I take that out - it seems to work. Of course, the user will require an e-mai client installed on the computer.
I was thinking along the same lines Corey... also.. I was looking for some clarification from studionews... do you want the form to appear as a popup page as the visitor leaves the site? OR is it simply part of a Contact area on the site?

Paul
Reply With Quote
  #5 (permalink)  
Old 01-05-2004, 04:41 PM
WebProWorld New Member
 

Join Date: Dec 2003
Location: Atlanta, GA
Posts: 21
studionews RepRank 0
Default

Do I need to take the onSubmit command out all together?

Yes this feedback form is set to popup as the visitor leaves the site and I would like the data the visitor selects from this form to be sent to me via an email to customerservice@thestudionextdoor.com when they hit the submit button.
__________________
Heidi Jeannae Schaefer
studionews@thestudionextdoor.com
www.thestudionextdoor.com
Reply With Quote
  #6 (permalink)  
Old 01-05-2004, 05:21 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Okay then, as I understand it, you're using a JavaScript function to call your feedback form. This script is currently referenced in your homepage but nowhere else. If you want the feature to be sitewide, you'll need to reference that script from each of your main pages.
You use the unload command in the page's body tag to prompt the script into action (see below)
Code:
<body onUnload="PopWindow420424()">
as with the script, you'll need to modify that line in each of your pages (apart from the feedback form itself obviously!).

Try that out, and let me know how you get on.

Paul
Reply With Quote
  #7 (permalink)  
Old 01-05-2004, 05:28 PM
WebProWorld New Member
 

Join Date: Dec 2003
Location: Atlanta, GA
Posts: 21
studionews RepRank 0
Default

the popup is working fine. What I need to do now is get the data from the popup fields (http://www.thestudionextdoor.com/feedback.htm) the user will enter to be sent to me via email when they hit the submit button. Is this possible? I think I'm lacking JS to make this work right...not quite sure how to get that.
__________________
Heidi Jeannae Schaefer
studionews@thestudionextdoor.com
www.thestudionextdoor.com
Reply With Quote
  #8 (permalink)  
Old 01-05-2004, 05:33 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default The form works fine

I accessed the feedback form and sent the following mail (via Mozilla Firebird/Outlook) about 20 minutes ago.. did you not receive that email?

Quote:
Originally Posted by pauls mozilla firebird
select=Definately+Easy&select2=Great+selection%2C+ great+prices
&textarea2=Please+be+specific...
&textarea=Please+list+your+suggestions+here...
&Submit=Submit
I've also sent one via Internet Explorer, and that simply attaches the form information in a file called postdata.att (you can open this in Notepad).

To get reliable, formatted emails you really need to use server side scripting CGI, ASP or PHP. These technologies all have the ability to validate and process the form fields and format them to your requirements. Does your hosting allow for server side script to run?

Paul
Reply With Quote
  #9 (permalink)  
Old 01-05-2004, 06:35 PM
redcircle's Avatar
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Grand Rapids, MI USA
Posts: 553
redcircle RepRank 0
Default

I need to see the code this came from in the form tag

onSubmit="this.mail; ReadForm (this);"

I don't know what ReadForm does.

Also you are trying to use mailto: this will only work if the user has configured an email client on the computer. Which means if someone is at the library or some other sort of public location this form will not work.

My suggestion is to use formmail or some other cgi script.
__________________
www.squitosoft.com - PHP development site. featuring Squito Gallery. a php driven photo gallery.
www.rgfx.net - Specializing in Internet solutions, including Html authoring, Interactive Web sites, 3D/2D Graphics and animation.
Reply With Quote
  #10 (permalink)  
Old 01-05-2004, 07:44 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default Merged posts

You're spot on redcircle, (as usual!) the member is currently using the mailto command.

NB: This post was also submitted to the Site Design forum, and the two posts have now been merged.
Reply With Quote
  #11 (permalink)  
Old 01-05-2004, 11:16 PM
WebProWorld New Member
 

Join Date: Dec 2003
Location: Atlanta, GA
Posts: 21
studionews RepRank 0
Default

cool! You guys are awesome. You're hilarious Paul - got your email :). You guys are right the mailto causes problems and the emails I'm getting are very difficult to decifer. I will try your suggestions...if I can figure it out. ;-)If you haven't already noticed, I'm a little blonde at this stuff.
__________________
Heidi Jeannae Schaefer
studionews@thestudionextdoor.com
www.thestudionextdoor.com
Reply With Quote
  #12 (permalink)  
Old 01-06-2004, 01:44 PM
WebProWorld New Member
 

Join Date: Dec 2003
Location: Atlanta, GA
Posts: 21
studionews RepRank 0
Default

Hi guys! Thanks for all your help yesterday! I was wondering if you could help me with another question. :) I have updated the script for formmail but I'm not sure I have it right. I took a web tutorial with Univ of Vermont online.
<form action="http://scripts.thestudionextdoor.com/cgi-bin/FormMail.pl" method="post" name="feedback">
<input type="hidden" name="recipient" value="customerservice@thestudionextdoor.com">
When I test the submit button I get a "Cannot find server -The page cannot be displayed" error and no email. Can you tell me what I'm missing? Thanks a bunch!
__________________
Heidi Jeannae Schaefer
studionews@thestudionextdoor.com
www.thestudionextdoor.com
Reply With Quote
  #13 (permalink)  
Old 01-06-2004, 01:56 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default A couple of things...

Hi there Heidi,

Could you tell us exactly where the FormMail.pl script is to be found? I'm hoping it's stored in your cgi-bin folder as indicated... it may be that the script isn't configured correctly.

Often it can be simply traced back to the initial 'shebang' line in the script.. this contains the location of the Perl interpreter on your server, which then enables the script to be executed. Typically you would have a line like the following: #!/usr/local/bin/perl

Hope that helps,

Paul

PS. I was also a bit confused as to why you've added the 'scripts' subdomain to the URL (is this just for your own testing?)
Reply With Quote
  #14 (permalink)  
Old 01-06-2004, 02:17 PM
WebProWorld New Member
 

Join Date: Dec 2003
Location: Atlanta, GA
Posts: 21
studionews RepRank 0
Default

What you're saying makes complete sense. I haven't put the script into my cgi-bin...the tutorial didn't tell me I had to do that. :0 Obviously, I'm really green at web programming so I'm not thinking like one. If I'm not told to do something it doesn't get done. Should I change the path or could you point me in the direction to develop the script for the cgi-bin?

PS. I was also a bit confused as to why you've added the 'scripts' subdomain to the URL (is this just for your own testing?) I followed the same format as used in the tutorial. I can remove this if it's not needed.
__________________
Heidi Jeannae Schaefer
studionews@thestudionextdoor.com
www.thestudionextdoor.com
Reply With Quote
  #15 (permalink)  
Old 01-06-2004, 02:26 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Quote:
Originally Posted by studionews
Should I change the path or could you point me in the direction to develop the script for the cgi-bin?
The script should be stored in your cgi-bin.. if you'd like to send me a copy of the script by PM or email.. I don't mind looking it over.

Quote:
Originally Posted by studionews
I followed the same format as used in the tutorial. I can remove this if it's not needed.
I would just use your standard URL i.e. http://thestudionextdoor.com/cgi-bin/FormMail.pl
Let me know when you've done that! :o)

Paul
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0