...

View Full Version : updated title: <![CDATA tags blocking javascript possible?



cyborg360
01-01-2010, 03:44 AM
not sure how to correct this issue with the height. What is the solution?



Attribute "height" exists, but can not be used for this element.
"ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onm

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.



<div style="width: 225px; float: left; height: 16px; background-color: #000000; color: #FFFFFF; margin-left: 0px; margin-bottom: 0px; font-size: small; padding-left: 0px;">
&nbsp;<img src="images/news.png" height="16" width="222" /><div style="width: 226px; height: 155px; float: left;"><script type="text/javascript">if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" height="'+sheight+'" bgcolor='+sbcolor+'><layer id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=rspeed"></layer></ilayer>')}
if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;"></div></div>');}</script>
</div></div>

oesxyl
01-01-2010, 03:47 AM
not sure how to correct this issue with the height. What is the solution?


<div style="width: 225px; float: left; height: 16px; background-color: #000000; color: #FFFFFF; margin-left: 0px; margin-bottom: 0px; font-size: small; padding-left: 0px;">
&nbsp;<img src="images/news.png" height="16" width="222" /><div style="width: 226px; height: 155px; float: left;"><script type="text/javascript">if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" height="'+sheight+'" bgcolor='+sbcolor+'><layer id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=rspeed"></layer></ilayer>')}
if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;"></div></div>');}</script>
</div></div>

comments, :) for xhtml:


<script type="text/javascript">// <![CDATA[
....
// ]]></script>


best regards

cyborg360
01-01-2010, 03:56 AM
comments, :) for xhtml:


<script type="text/javascript">// <![CDATA[
....
// ]]></script>


best regards

cool that took care of 12 errors.

but now my news ticker isnt working...maybe if I fix something else it will...I hope I can still use the thing with completely validated code.

If I validate more is it likely the javascript running the news ticker will work if adding <![CDATA... stopped it from working?

oesxyl
01-01-2010, 04:17 AM
cool that took care of 12 errors.

but now my news ticker isnt working...maybe if I fix something else it will...I hope I can still use the thing with completely validated code.
this:

<div style="width: 226px; height: 155px; float: left;">![CDATA[<script type="text/javascript">


</div>');}]]></script>

must be:

<div style="width: 226px; height: 155px; float: left;"><script type="text/javascript">// <![CDATA[


</div>');}// ]]></script>
javascript comments // <![CDATA[ or /* <![CDATA[ */ after <script type..
and // ]]> or /* ]]> */ before </script>

best regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum