...

View Full Version : Form Email help



jeffm3434
05-04-2007, 06:19 PM
I've been searching this forum for the last hour and while I found some really cool info that I am tucking away for later use I was unable to find the solution to my current problem (I do apologize if this has been answered and I just didn't find it).

I'm not sure if this is the right forum or not... but here goes anyway.

Problem: I have a basic Email form on a website that I created for a friend. The page works fine in Firefox on my PC and on several other browsers on his MAC. However, when I try to submit the form in I.E. 7 on my PC the form does submit (meaning the email is received as it should) but the redirect does not open the "Thanks for Your Email" page. Instead in IE 7 it actually tries to open the gdform.php file (this site is hosted at GoDaddy and this is one of their standard mail form handler scripts). So when this file tries to open I get the "HTTP 400 Bad Request" error page. I created this form in Dreamweaver 8. I am really still a newbie at all this stuff and just keep hacking at it till I get it right. But this one I can't figure out.

Thanks for any help you guys can provide,
Jeff

Here's the HTML if it helps....



body {
background-image: url(../../../../styles/canvas/background-blue.jpg);
}


.style1 {
font-family: Batang;
font-weight: bold;
font-size: small;
}td img {display: block;}


.style2 {
font-family: "Comic Sans MS";
font-size: small;
font-weight: bold;
}
.style8 {font-family: "Comic Sans MS"}
.style4 { font-family: "Comic Sans MS";
font-size: 16px;
font-weight: bold;
}
.style6 {font-family: "Comic Sans MS"; font-size: 20px; font-weight: bold; }
.style10 {font-size: 16px; font-family: "Comic Sans MS";}
.style12 {
font-size: 14px;
font-family: "Comic Sans MS";
font-weight: bold;
}
</style>
<script language="JavaScript1.2" type="text/javascript" src="../../../../menu/mm_css_menu.js"></script>
<script type="text/JavaScript">
<!--

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body onload="MM_preloadImages('../../../../menu/home%20down.png','../../../../menu/links%20down.png','emailaddressltblue.gif')">

<div align="center">
<table width="800" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="139" height="63"></td>
<td width="333" rowspan="3" valign="top"><div align="center"><img src="../../../../primary_images/marshall logo - blue.gif" alt="Marshall Photgraphy - for all your Wedding, Bridal, Family, Special Portraits, Scenic, and Commercial Photography needs" width="279" height="110" /></div></td>
<td width="213">&nbsp;</td>
<td width="103"></td>
<td width="12"></td>
</tr>
<tr>
<td height="51"></td>
<td valign="top"><div align="center"><span class="style1">3605 Smithfield Drive <br />
Conover, North
Carolina<br />
828-465-4321</span></div></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="20"></td>
<td>&nbsp;</td>
<td></td>
<td></td>
</tr>
<tr>
<td height="16" colspan="5" valign="top"><div align="center"><img src="../../../../styles/canvas/linebar.gif" alt="" width="800" height="4" vspace="6" /></div> <div align="center"></div></td>
</tr>
<tr>
<td height="729" colspan="4" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="788" height="722" valign="top"><form action="../../../../gdform.php" method="post" >
<input type="hidden" name="subject" value="Form Submission" />
<input type="hidden" name="redirect" value="../pages/aboutus/contact/email/thankyou.htm" />
<p>
<label>
<div align="left"><span style="font-family: &quot;Comic Sans MS&quot;">Name:</span> <span class="style2">(required)</span> <br />
<input name="a - NAME" type="text" id="a - NAME" size="50" />
</label>
<p>
<label>
<div align="left"><span class="style8">Phone:</span> <span class="style2">(required)</span><br />
(
<input name="b - PHONEAREACODE" type="text" id="b - PHONEAREACODE" size="5" maxlength="3" />
)
<input name="c - PHONEEXCHANGE" type="text" id="c - PHONEEXCHANGE" size="5" maxlength="3" />
-
<input name="d - PHONELAST4" type="text" id="d - PHONELAST4" size="8" maxlength="4" />
</label>
<p align="left"><span style="font-family: &quot;Comic Sans MS&quot;">Your E-mail Address: <span class="style2">(required)</span></span>
<br />
<input name="email" type="text" id="email" size="50" />
<br />
<label><span class="style8">Retype Your E-mail Address</span>: <span class="style2">(required)<br />
</span>
<input name="emailvalidate" type="text" id="emailvalidate" size="50" />
</label>
</p>
<p style="font-family: &quot;Comic Sans MS&quot;"><label><label>
<div align="left" class="style9">
<span class="style10">Your Photo Needs: </span></label>
<span class="style10">
<label>
</span>
<div align="left">
<input type="radio" name="g - PHOTONEEDS" value="Wedding" />
<span style="font-family: &quot;Comic Sans MS&quot;">Wedding --Date of Wedding</span>
<select name="h - MONTH" size="1" id="h - MONTH">
<option>-select-</option>
<option>January</option>
<option>February</option>
<option>March</option>
<option>April</option>
<option>May</option>
<option>June</option>
<option>July</option>
<option>August</option>
<option>September</option>
<option>October</option>
<option>November</option>
<option>December</option>
</select>
<select name="i - DAY" size="1" id="i - DAY">
<option>-select-</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select>
<select name="j - YEAR" id="j - YEAR">
<option>-select-</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select>
<br />
------&gt;(<a href="../../../../calendar/calendar.htm" target="_blank">Click Here to See Available Wedding Dates.</a>)&lt;-------</div>
</label>
<label></label>
<label>
<div align="left">
<input type="radio" name="g - PHOTONEEDS" value="IndividualOrFamily" />
<span style="font-family: &quot;Comic Sans MS&quot;">Individual or Family Photos</span></div>
</label>
<label>
<div align="left">
<input type="radio" name="g - PHOTONEEDS" value="Other" />
<span style="font-family: &quot;Comic Sans MS&quot;">Other</span></div>
</label>
<p align="left" style="font-family: &quot;Comic Sans MS&quot;">How did you hear about Marshall Photography?<br />
<input name="k - REFERREDBY" type="text" id="k - REFERREDBY" size="100" />
</p>
<p style="font-family: &quot;Comic Sans MS&quot;">
<label>
<div align="left" class="style9">
<span class="style10">Message:</span> </label>
<div align="left">
<textarea name="l - MESSAGE" cols="100" rows="25" id="l - MESSAGE"></textarea>
</div>
<div align="left">
<p>
<input name="m -SUBMITBUTTON" type="submit" id="m -SUBMITBUTTON" value="submit"/>
<span class="style12"> (Please only click the Submit button one time and wait up to 30 seconds. A new page will open once the email has been sent.)</span> <br />
</p>
</div>
</form>
</td>
</tr>
<tr>
<td height="4"></td>
</tr>

</table></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="13"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="35" colspan="5" valign="top"><div align="center"><span class="style6">Marshall Photography</span></div></td>
</tr>

<tr>
<td height="35" colspan="5" valign="top"><div align="center"><span class="style4"> for all your Wedding, Bridal, Family, Special Portraits,
Scenic, and Commercial Photography needs</span></div></td>
</tr>
<tr>
<td height="19" colspan="5" valign="top"><div align="center" style="font-style: italic; font-size: 14px; font-weight: bold">&copy;2007 by Marshall Photography. All rights reserved. </div></td>
</tr>
<tr>
<td height="24" colspan="5" valign="top"><div align="center"><a href="mailto:info@marshallphotonc.com" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('email','','emailaddressltblue.gif',1)"><img src="emailaddressdkblue.gif" alt="email" name="email" width="304" height="24" border="0" id="email" /></a></div></td>
</tr>
<tr>
<td height="18"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</body>
</html>

whizard
05-04-2007, 08:09 PM
I'm a little confused here as to what exactly your problem is...

Is it that:
a) The email is received on IE7 but the 'thank you' page doesn't show, and instead IE7 tries to open the PHP file.
-or-
b) The email isn't received at all, nor does the PHP file show.

Dan

jeffm3434
05-04-2007, 08:25 PM
The problem is:
a) The email is received on IE7 but the 'thank you' page doesn't show, and instead IE7 tries to open the PHP file.

In other words... the PHP script does seem to process the "submit" b/c the email is received as designed.... but in IE 7 only the redirect is not processed and instead the browser tries to open the PHP file (if you you look in the URL line on the browser it lists... www.mywebsitename.com/gdform.php) and I get the HTTP 400 Bad Request error. The redirect should force the browser to open the thankyou.htm page. This all works like it should in Firefox... I'm not sure if it works in an older version of IE or not... I only have access to IE 7.

The problem is I am not sure if this is a php problem (which I have no control over the php script... that is all handled by GoDaddy), a IE 7 problem (obviously that would be a Microsoft problem), or if I have done something wrong or poorly in my HTML that is causing this (however, whatever the problem it only malfunctions in IE 7... as far as I know).

vinyl-junkie
05-06-2007, 08:09 AM
Are you trying to open the "thank you" page in a new window? If so, it's possible that the pop-up blocker in IE7 is preventing that from happening. Click on Tools, then Pop-Up Blocker, then look at those settings.

jeffm3434
05-07-2007, 06:15 PM
Are you trying to open the "thank you" page in a new window? If so, it's possible that the pop-up blocker in IE7 is preventing that from happening. Click on Tools, then Pop-Up Blocker, then look at those settings.

No... I don't think the pop-up blocker is the problem. The email form itself is a new window. Then the "thank you" page opens in that current window. The thank you page has a "close window" button on it. Once that is closed then the main webpage is back in focus. The problem is seems to be that the redirect statement is not working. Instead of opening the thank you page it tries to open the PHP script as though it is a webpage.

It works for Firefox but not IE 7. If anybody out there happens to have an older version of IE on their machine... maybe you would be willing to test the page for me. Maybe this is a problem that IE 7 has created. I swear this used to work back when I originally created and tested it... but I had IE 6 then. Just not sure if I changed something since then (other than installing IE 7).

If you are will to test it for me, send me a PM and I will send you the URL for the page to test it on.

Anybody got any other ideas?

TheProdigy
05-08-2007, 03:27 AM
I recommend jotform.com. Go check it out..CAPTCHA included free.

jeffm3434
05-08-2007, 06:22 PM
Quick update...

I found a machine with IE 6 on it and it doesn't work there either. So obviously it is something either in the php script or in my HTML file. Has to be related to either the "submit" button code or in the "redirect" code.

Any help?

Oh... and I checked out that JotForm site... looks like it could work but my preference would be not to depend on another site like that. Seems like you are just asking for trouble... plus there are limits to how many submits you can receive unless you are willing to pay for a service which I am already getting with my hosting plan.

jeffm3434
05-09-2007, 02:16 AM
problem solved...

the path I used for my redirect "thankyou" file started with ../

it seems that firefox was ok with that but IE was not. so take off the ../ and now it all works.

elcobb
05-13-2007, 01:38 AM
JotForm is great! Thank you.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum