...

View Full Version : Javascript code



stickers
09-02-2010, 08:47 PM
Hi,

Which is the difference between to use "<!-- //-->" inside the script or not?




<script language=JavaScript>
<!--
function stopError() {
return true;
}
window.onerror = stopError;
// -->
</script>





<script language=JavaScript>

function stopError() {
return true;
}
window.onerror = stopError;

</script>


Any advice is welcome!!

stickers

DaveyErwin
09-02-2010, 08:52 PM
Hi,

Which is the difference between to use "<!-- //-->" inside the script or not?











Any advice is welcome!!

stickers

I think the difference is the number of chars you must type.
But I'm not so good with objects.

Philip M
09-02-2010, 08:57 PM
<script language=javascript> is long deprecated and obsolete. Use <script type = "text/javascript"> instead.
The <!-- and //--> comment (hiding) tags have not been necessary since IE3 (i.e. since September 1997). If you see these in some published script it is a warning that you are looking at ancient and perhaps unreliable code.

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

DaveyErwin
09-02-2010, 09:10 PM
<script language=javascript> is long deprecated and obsolete. Use <script type = "text/javascript"> instead.
The <!-- and //--> comment (hiding) tags have not been necessary since IE3 (i.e. since September 1997). If you see these in some published script it is a warning that you are looking at ancient and perhaps unreliable code.

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

sorry



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum