Click to See Complete Forum and Search --> : tag <script> missing required attribute "type".


spuddy
12-29-2002, 08:33 AM
I have entered in the following script into my web page but when I have it checked I receive the following message - Warning: tag <script> missing required attribute "type". Hint: use "type" attribute with "language" attribute

Can some one possibly let me know what I need to add to my script inorder that theis error does not occur.

<script language="JavaScript"><!--
// hide script
function mailer()
{
var sb_domain = "doncaster40.freeserve.co.uk"
var sb_user = "alan_grey"
var sb_recipient = sb_user + "@" + sb_domain
var sb_url = "mailto:"
window.location.href= sb_url + sb_recipient;
}
// -->
</script>
<a href="#" onClick="mailer()">E-mail</a>

blufive
12-29-2002, 08:39 AM
Change:<script language="JavaScript"> to<script type="text/javascript">

Beach Bum
12-29-2002, 04:22 PM
just a little more info -

the type attribute is the current standard.

the language attribute is used for consistency with older browsers.

so you could use both for best "coverage".