homepage Welcome to WebmasterWorld Guest from 54.205.52.110
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
semiaziz




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

Howdy!
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) {
document.view1.src=image;
}
//-->
</script>

could someone please help me out?
thanks

 

bird




msg:1488346
 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">

bobriggs




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


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

[added]
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.

semiaziz




msg:1488348
 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.

bird




msg:1488349
 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%;}
</style>

<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