You are here: XHTML Javascript compatability with Firefox « HTML « IT news, forums, messages
XHTML Javascript compatability with Firefox

Posted by JF01 on 02/04/06 21:21

Hi,

I have an XHTML page with the following DTD Declaration: <!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Inside, I have a form with the following format:

<form action="login.asp" method="post" id="frm1">
<input type="text" size="30" name="email" id="email">
<input type="button" value="Register" class="formbutton1" id="submit1"
name="submit1" onclick=javascript:callsubmit();>

Inside the <head> tag, I have the following javascript:

<script type="text/javascript">
function callsubmit()
{

var pwl = frm1.pass.value.length;

if (frm1.email.value == "")
{alert("The e-mail field is required");}

else
{frm1.submit();}
}
</script>

This is designed as a very simple form validation script, and it works
perfectly in IE6, but in Firefox 1.5, the javascript does not run. Can
anyone suggest how I can make the script compatible with both browsers?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация