...

View Full Version : Html Post - Ff / Ie7



rcolyn
12-24-2007, 06:19 AM
Hi

I have a page : http://www.fishhoeklionsclub.org.za/add_club.html

Which *should* post a form via email.

This works 100% in FFox :thumbsup:, but not in IE7 :mad: .... PLEASE could somebody help :confused: !!

Regards & Many Thanks
Ralph Colyn

Philip M
12-24-2007, 07:42 AM
Line: 127
Character: 2
Error: document.getElementById(...) is null or not an object.

If you post the relevant code perhaps someone will be able to assist you further.

rcolyn
12-24-2007, 08:02 AM
Hope this helps



<script language="JavaScript">
if (navigator.appVersion.lastIndexOf('Win') != -1) {
dropline = "\r\n" } else { dropline = "\n" }

function coffeemsg(form) {
document.ccform.Message.value = (
' ' + dropline + dropline
+ '--------- Add Club Request --------' + dropline
+ 'Club Name : ' + document.ccform.clubname.value + dropline
+ 'Meeting : ' + document.ccform.meetingdays.value + dropline
+ 'Time : ' + document.ccform.time.value + dropline
+ 'District : ' + document.ccform.district.value + dropline
+ 'Address : ' + document.ccform.address1.value + dropline
+ ' ' + document.ccform.address2.value + dropline
+ ' ' + document.ccform.address3.value + dropline
+ ' ' + document.ccform.address4.value + dropline
+ ' ' + dropline + dropline
+ ' Lat/long : '+ document.getElementById("latbox").value + dropline
+ '--------- Contact Details --------' + dropline
+ 'Name : ' + document.ccform.name.value + dropline
+ 'Phone : ' + document.ccform.phone.value + dropline
+ 'E-mail : ' + document.ccform.email.value + dropline
+ dropline + dropline
+ 'Message : ' + document.ccform.message.value + dropline
+ dropline + dropline
);
}

// -->
</script>

<img src="lionline.gif" width="500" height="41" alt="" border="0">
<div align="LEFT">
<form name="ccform" action="mailto:addmyclub@fishhoeklionsclub.org.za?subject=Lions Club Addition&amp;cc=hylton@conacher.co.za" method="post" enctype="text/plain">
<table border="0" width="100%">
<tr><!-- Row 1 -->
<td><strong><u><font face="Arial">Club Details<br></font></u></strong>
<form name="ccform" action="mailto:webmaster@fishhoeklionsclub.org.za?subject=Lions Club Addition&amp;cc=hylton@conacher.co.za" method="post" enctype="text/plain"><input type="hidden" name="Message">

<p><font face="Arial, ARIAL"><b>Club Name:</b></font>
<p><input onchange="coffeemsg()" size="25" name="clubname"> </p></form></td><!-- Col 1 -->

<td>
<p><font face="Arial, ARIAL"><b>Meeting Day:</b></font>
<p><input onchange="coffeemsg()" size="25" name="meetingdays"> </p></td><!-- Col 2 --></tr>
<tr><!-- Row 2 -->
<td>
<p><font face="Arial, ARIAL"><b>Meeting Time/s:</b></font>
<p><input onchange="coffeemsg()" size="25" name="time"> </p></td><!-- Col 1 -->

<td>

<p><font face="Arial, ARIAL"><b>District:</b></font>
<p><select name="district">
<option selected="" value="410A">410A</option>
<option value="410B">410B</option>
<option value="410C">410C</option>
<option value="410D">410D</option>


</select>
</tr>
<tr><!-- Row 3 -->
<td>
<p><font face="Arial, ARIAL"><b>Address:</b></font>
<p><input onchange="coffeemsg()" size="25" name="address1">
<p><input onchange="coffeemsg()" size="25" name="address2">
<p><input onchange="coffeemsg()" size="25" name="address3">
<p><input onchange="coffeemsg()" size="25" name="address4">
</p></td><!-- Col 1 -->
<td>

<p>
<font face="Arial, ARIAL"><b>Additional Info:</b></font><p><textarea name="message" rows="5" wrap="auto" cols="45" onchange="coffeemsg()"></textarea>
<strong><u><font face="Arial">Your Details</font></u></strong><br><br>
<font face="Arial, ARIAL"><b>Name:</b></font><p>
<input size="25" name="name" onchange="coffeemsg()"> </p></td><!-- Col 1 -->
<td>

<p>
<font face="Arial, ARIAL"><b>Phone:</b></font><p>
<input size="25" name="phone" onchange="coffeemsg()"> </p></font></td><!-- Col 2 --></tr>
<tr><!-- Row 6 -->
<td>

<p>
<font face="Arial, ARIAL"><b>Email:</b></font><p>
<input size="25" name="email" onchange="coffeemsg()"> </p></td><!-- Col 1 -->
<td></td><!-- Col 2 --></tr>
</table>

<center>
<input type="submit" value="Send Request" onclick="coffeemsg()">
</center>
</form>
<p>

abduraooft
12-24-2007, 08:10 AM
If this is the code I see document.getElementById("latbox").value out of which I couldn't find out any element having id="latbox" in your given html.

rcolyn
12-24-2007, 08:26 AM
Sorry, I missed this



<font face="Arial, ARIAL"><br><b>Lat/Long : <input size="35" type="TEXT" id="latbox" name="latbox" value="" onchange="coffeemsg()">


Just above the code posted before !!

rcolyn
12-27-2007, 02:53 PM
no need to worry about this thread, I've gone the PHP route

Thanks for replying



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum