Solved: Problem with contact form

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

flinty

Thread Starter
Joined
Jul 26, 2007
Messages
13
Hi,

I have just finished designing my website and am having a major problem with my contact form. I'm not an advanced designer, more like a beginner!

So because I didn't feel confident in designing my own form, I decided to use Mail Maniac free form designer as it offered automatic forwarding to my mailbox. Code is pasted at the bottom!

The form worked really well in IE but in Safari and Firefox users could not write in the text boxes. I'm really puzzled as to why this has happened, so I decided to design my own form using the tools that came with CoffeeCup HTML Editor, which I have been using to write the website. This form again looked good in IE but in Firefox and Safari just displayed as 'form object'.

I am completely puzzled and really don't have the knowledge to fix this problem. Can anyone help?

Oh, if it matters...our web host is storminternet.co.uk, Linux basic package which has PHP, CGI etc supported.

Thanks for any help!

Mail Maniac code:
<html>
<head>
<title>Contact form</title>
</head>

<body>

<form name="mailmaniac-form" method="post" action="http://www.mail-maniac.com/" enctype="multipart/form-data">
<input name = "userid" type="hidden" value = "yumasia">

<table border= "0" cellspacing="5" cellpadding="5">

<input type = "hidden" name = "mailto" value = "info(at)yumasia.co.uk">
<input type = "hidden" name = "subject" value = "Product query">
<input type = "hidden" name = "fromname" value = "Website form">
<input type = "hidden" name = "goto" value = "http://www.yumasia.co.uk/query.html">

<tr>
<td><strong>Your name</strong></td>
<td><input type = "text" name = "Name" size ="40"></td>
</tr>

<tr>
<td><strong>Your email address</strong></td>
<td><input type = "text" name = "Email" size ="40"></td>
</tr>

<tr>
<td><strong>How did you find us?</strong></td>
<td>
<select name = "Found_us_by">
<option value = "Google_search">Google search</option>
<option value = "Yahoo_search">Yahoo search</option>
<option value = "MSN_search">MSN search</option>
<option value = "Friend">Friend</option>
<option value = "Other">Other</option>
</select>
</td>
</tr>

<tr>
<td valign = "top"><strong>Message</strong></td>
<td><textarea name = "Comments" rows ="6" cols ="40"></textarea></td>
</tr>



<tr>
<td></td>
<td><input type="submit" value = "Submit form"></td>
</tr>

</table>

</form>
 
Joined
Sep 10, 2006
Messages
207
Here you go , Tested in IE and FF :)

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Contact form</title>
</head>
<body>
<form name="mailmaniac-form" method="post" action="http://www.mail-maniac.com/" enctype="multipart/form-data" id="mailmaniac-form"><input name="userid" type="hidden" value="yumasia" /><input type="hidden" name="mailto" value="info(at)yumasia.co.uk" /><input type="hidden" name="subject" value="Product query" /><input type="hidden" name="fromname" value="Website form" /><input type="hidden" name="goto" value="http://www.yumasia.co.uk/query.html" />
<table border="0" cellspacing="5" cellpadding="5">
<tr>
<td><strong>Your name</strong></td>
<td><input type="text" name="Name" size="40" /></td>
</tr>
<tr>
<td><strong>Your email address</strong></td>

<td><input type="text" name="Email" size="40" /></td>
</tr>
<tr>
<td><strong>How did you find us?</strong></td>
<td><select name="Found_us_by">
<option value="Google_search">Google search</option>
<option value="Yahoo_search">Yahoo search</option>
<option value="MSN_search">MSN search</option>
<option value="Friend">Friend</option>
<option value="Other">Other</option>
</select></td>

</tr>
<tr>
<td valign="top"><strong>Message</strong></td>
<td>
<textarea name="Comments" rows="6" cols="40">
</textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Submit form" /></td>
</tr>
</table>
</form>
</body>
</html>
 

flinty

Thread Starter
Joined
Jul 26, 2007
Messages
13
Hi bob121!

Thanks for this but I have loaded the code you gave on this page www.yumasia.co.uk/contact2.html and it still doesn't work with Firefox or Safari but works with IE perfectly. The text boxes can't be written in still.

It's not only me, people contacting by e-mail have said they can't write in the text boxes either. I'm using the latest versions of both Firefox and Safari and have Vista Home Basic OS, if this helps?

Thanks for any help you can give!
 
Joined
Sep 10, 2006
Messages
207
I have had a look at that page and found the reason.

It seems if you remove your disable right click Javascript it appears to work.

So i would remove:

Code:
<!-- Begin Disable Right Click Script -->
<script type="text/javascript">
document.oncontextmenu = function() {
  return false
}

if(document.layers) {
  window.captureEvents(Event.MOUSEDOWN);
  window.onmousedown = function(e) {
    if(e.target==document)
      return false;
  }
}
else {
  document.onmousedown = function(){return false}
}
</script>

<!-- End Disable Right Click Script -->
I'm not saying don't use a disable right click script, even though i find them very pointless, but use a different script as that one interferes.

Thanks James.
 
Joined
Sep 10, 2006
Messages
207
Here is a Disable Right Click script script which does not interfer with your Form.

Code:
<script language=JavaScript>
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
</script>
Thanks James :)
 

flinty

Thread Starter
Joined
Jul 26, 2007
Messages
13
Hi James,

I've just taken out the disable right click code and the form works perfectly in all 3 browsers...fantastic! :) Thanks so much for your help and the new disable right click code.

Neil
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top