Jump to content


Photo

I need some help troubleshooting a form script


  • Please log in to reply
3 replies to this topic

#1 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 23 August 2010 - 02:23 PM

Can someone see why this simple form doesn't work? I can't find any issue with it.
http://izettconstruc...eeestimate.html


<form style="font-size:20px;"   
		action="mailto:nojunkbox@gmail.com"
	method="POST"
	enctype="multipart/form-data"><br /> 
  Full Name: <br />
		<input type="text" name="name" size="40"/><br />
  Address: <br />
		<input type="text" name="address" size="40"/><br />
		City: <br />
		<input type="text" name="city" size="40"/><br />
		State:<br />
		<select name="state"> 
   <option value="va" selected="selected">Northern Virginia</option>
   <!-- <option value="md" >Maryland (DC Suburbs)</option> -->
   <!-- <option value="dc" >Washington DC</option> -->
		</select><br />
		ZIP Code: <br />
		<input type="text" name="zip" size="40"/><br />
		Best Contact Phone Number:<br />
		<input type="text" name="zip" size="40"/><br />
		Email:<br />
		<input type="text" name="email" size="40"/><br /><br />
		What type of work do you need? Please provide as much information as possible.<br />
		<textarea name="work" rows="10" cols="80">
  </textarea><br />
		<input name="submit" type="button" value="Submit for Estimate" size="20" onClick="window.open('http://www.izettconstruction.com/thankyou.html','newwindow','width=400,height=200,toolbar=no, 
location=yes,directories=yes,status=yes,menubar=no,scrollbars=yes,copyhistory=no
, resizable=yes')"/>
  </form>


#2 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 23 August 2010 - 03:02 PM

Looks like the line breaks in the last parameter of window.open (the one with window height, width, etc.) break the string and invalidate the code. Removing those makes the window pop up.

Also, using mailto:... as an action is discouraged nowadays because you have no way of knowing if the browser and mail program can actually handle that properly. Not mentioning all those people who don't have their mail accounts configured locally but use webmail only. And if you really want to make use of that you need to set <form enctype="text/plain">.
If that's just for you to test, it's fine obviously.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#3 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 23 August 2010 - 03:45 PM

Which line breaks are you referring to in the last part? I can't find any line breaks on my end.(EDIT:I think I found it...)

I agree also mailto is old now that I'm researching on the net. I think I have to write a php script to email it. I just started this job and don't even know if SMTP is even set up on my bosses server. He's out of the office right now and I don't even have root server access yet. :huh:

I'd be happy if I could just get the reply window to even open up...

#4 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 24 August 2010 - 06:29 AM

So does it work now?

If you want to use a PHP script, I suggest you take one of the professional open PHP classes or scripts you can find online. You'll need a couple security checks if you don't want people to abuse your mail script as a free spam machine. It's fine if you know PHP and the mail-targeted exploits enough to write a secure version yourself, but otherwise I'd go with something tried and tested.
Then there are also solutions like Response-o-matic, however, I'm not sure if that's an option in your case.

Edited by Phil, 24 August 2010 - 06:37 AM.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users