Forum Moderators: open

Message Too Old, No Replies

end tag for "SCRIPT" omitted,

end tag for "SCRIPT" omitted,

         

cincodeditos

10:25 am on Feb 23, 2010 (gmt 0)

10+ Year Member



I have the following error and I canīt figure it out, please help?

Line 143, Column 158: end tag for "SCRIPT" omitted, but its declaration does not permit this
…obal/preMainGreen.gif" alt=""> </div>', onHide: function(h) { if ($.browser.c
&#9993;
You forgot to close a tag, or
you used something inside this tag that was not allowed, and the validator is complaining that the tag should be closed before such content can be allowed.
The next message, "start tag was here" points to the particular instance of the tag in question); the positional indicator points to where the validator expected you to close the tag.

Line 140: start tag was here
><script type="text/javascript">

This is the javascript:

<script type="text/javascript">
//<![CDATA[
$().ready(function(){
$('#contactUsModal').jqm({closeClass: 'lnkClose', ajaxText:}) '<div class="loaderFull"> <img src="http://example.com/img/global/preMainGreen.gif" alt=""> </div>', onHide: function(h) { if ($.browser.chrome || $.browser.msie) $('object').show(); h.w.html(''); h.w.hide(); h.o.remove(); }, onShow: function(h) { if ($.browser.chrome || $.browser.msie) $('object').hide(); h.w.show(); h.w[0].ajaxSuccess = false; }, trigger: '#triggerContactUsModal', ajax: '/tickets/contactoptions/modal', modal: true;
});
//]></script>

[edited by: Fotiman at 1:51 pm (utc) on Feb 23, 2010]
[edit reason] Examplified URL [/edit]

daveVk

10:40 am on Feb 23, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



//]></script>

should be

//]>
</script>

as lines starting // (within script) are ignored, </script> was ignored

cincodeditos

10:55 am on Feb 23, 2010 (gmt 0)

10+ Year Member



Hey! Good input! Many thanks....
However, it didnīt like that either coz now I have a new error saying I didnīt end the script tag...
So what you said is probably right but there must be another error somewhere.

This is what it looks like now:

<script type="text/javascript">
//<![CDATA[
$().ready(function(){
$('#contactUsModal').jqm({closeClass: 'lnkClose', ajaxText:}) '<div class="loaderFull"> <img src="http://example.com/img/global/preMainGreen.gif" alt=""> </div>', onHide: function(h) { if ($.browser.chrome || $.browser.msie) $('object').show(); h.w.html(''); h.w.hide(); h.o.remove(); }, onShow: function(h) { if ($.browser.chrome || $.browser.msie) $('object').hide(); h.w.show(); h.w[0].ajaxSuccess = false; }, trigger: '#triggerContactUsModal', ajax: '/tickets/contactoptions/modal', modal: true;
}
//]>
</script>

[edited by: Fotiman at 1:50 pm (utc) on Feb 23, 2010]
[edit reason] Examplified URL [/edit]

cincodeditos

11:15 am on Feb 23, 2010 (gmt 0)

10+ Year Member



I found it!

Writing HTML in a SCRIPT Element

A common error (and the most common source of erroneous bug reports for the WDG HTML Validator) occurs when writing HTML tags within a SCRIPT element:

<script type="text/javascript">
<!--
// This is an error!
document.write("</P>");
// -->
</script>
As mentioned in the HTML 4 Recommendation's note about specifying non-HTML data in element content, end tags are recognized within SCRIPT elements, but other kinds of markup--such as start tags and comments--are not. This is an unintuitive quirk of SGML for elements defined to have CDATA content.

Authors should avoid using strings such as "</P>" in their embedded scripts. In JavaScript, authors may use a backslash to prevent the string from being parsed as markup:

<script type="text/javascript">
<!--
document.write("<\/P>");
// -->
</script>
Note that in XHTML, authors must also take care when using start tags within a script element. For details, see the Script and Style elements section of the XHTML 1.0 Recommendation as well as the HTML compatibility guideline for embedded scripts.

THANKS FOR HELPING!