homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

JS error: Error: required attribute "TYPE" not specified
HTML 4.01 Transitional, JS code question

 6:51 pm on Jul 29, 2002 (gmt 0)

am trying to validate my code which is HTML 4.01 Transitional, but the following piece of Javascript is wrong somehow

<script language="Javascript">
function image_swap (image) {

could someone please help me out?



 6:55 pm on Jul 29, 2002 (gmt 0)

The attribute "language" is not valid for the script tag in HTML 4.x. You need to define the correct MIME type instead:

<script type="text/javascript">


 6:55 pm on Jul 29, 2002 (gmt 0)

<script language="Javascript" type="text/javascript">

saw bird's post simulcast with mine. Actually the language attribute is deprecated in 4.01 transitional, so it will validate. I don't know which browsers use the attribute though.


 7:20 pm on Jul 29, 2002 (gmt 0)

thank you both. Would you happen to know the 4.01 equivalent of table height?
<table width="100%" height="90%" border="0" cellspacing="0" cellpadding="0" align="center">
isn't validating.


 7:29 pm on Jul 29, 2002 (gmt 0)

You need a stylesheet for that:

<style type="text/css">
table.whatever {width:100%;height:90%;}

<table class="whatever" border="0" cellspacing="0" cellpadding="0" align="center">

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved