Welcome to WebmasterWorld Guest from 54.166.152.121

Forum Moderators: open

Message Too Old, No Replies

JS error: Error: required attribute "TYPE" not specified

HTML 4.01 Transitional, JS code question

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

10+ Year Member



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

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

WebmasterWorld Senior Member 10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member




<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.

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

10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



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">

 

Featured Threads

Hot Threads This Week

Hot Threads This Month