PDA

View Full Version : Form doesn't submit in Firefox but does in IE??


JamesTaylor
02-05-2008, 08:47 PM
Hi guys i'm back with again with a firefox V's IE problem!!

the site can be viewed at www.virtualform.net/jesswright/contact.html (http://www.virtualform.net/jesswright/contact.html)

i have set the form up using a php script (tutorial regarding email and php on this site, many thanks!) to process the form and send the email. It works fine in IE but doesn't process in firefox?? can someone shed some light on whats wrong with the code and how i can fix it??

a couple of additional points where help would be much appreciated if possible too... i've had to scrap the image rollover submit button in order to get the submission to work but would like to reinstate if possible, can anyone advise?

finally, although the php script from the tutorial does its job does anyone know a good script / tutorial that will help me be able to create a slight more elegant response if one of the fields isn't filled out correctly? at present it just displays straight text in the browser advising of a problem, i'd like to be able to put this text back into the page design if possible so it appears more professional... i'm wondering though if this needs more advanced programming skill??

Thanks again

James

domedia
02-05-2008, 09:06 PM
If you want to write XHTML instead of HTML you need to make sure that you follow the rules ;)

The submit button is not closed:
<input type="image" name="Submit" src="WebImages/ContactSubmit01.jpg" id="Submit" >
Should be:
<input type="image" name="Submit" src="WebImages/ContactSubmit01.jpg" id="Submit" />

JamesTaylor
02-05-2008, 09:13 PM
domedia, my mistake its back in now but still doesn't work in Firefox??

domedia
02-05-2008, 09:28 PM
It's the anchor tag <a> around the submit button. In FF the Anchor tag link takes precedence. Remove the link and it works fine, just tested this here. Nice page btw James.

JamesTaylor
02-06-2008, 07:42 AM
Superb!! Thank you very much!

i'll get this amended when i get home tonight and set it live!!

Thanks for the positive comment on the page also, good feed back is always nice especially when its only the 2nd site i've built!!

can you offer me any advice as to how to make the submit a rollover graphic so it changes state... or will this not be possible as i have to remove the <a> tag??

and also any thoughts on creating a more elegant response when a field isn't filled out, again is this going into more complex programing and perhaps dynamic elements in a page??

cheers

James

domedia
02-06-2008, 08:21 PM
For the button this is an ugly inline example of how you can achieve the mouseover effect.
<input type="image" src="image.gif" alt="" onMouseover="this.src='image_on.gif';" onMouseout="this.src='image.gif';">

As far as the checking of fields go, I leave that to real javascript programmers ;)

JamesTaylor
02-10-2008, 09:47 AM
Thanks again Domedia,

rollover now works as expected, your help has been great! Cheers!

James