Is there any way to get rid of the following error:
junk after document element
...
<div class="message">
^
Ajax XML Ticker can be executed at:
http://www.dynamicdrive.com/dynamici...ajaxticker.htm
Thank you.
Is there any way to get rid of the following error:
junk after document element
...
<div class="message">
^
Ajax XML Ticker can be executed at:
http://www.dynamicdrive.com/dynamici...ajaxticker.htm
Thank you.
Yes. Instead of following the exact syntax for your external text file, use this template (additions highlighted):
Code:<!-- Wrap each ticker cotent inside <div class="message"> tag --><div><div class="message"> <a href="http://www.javascriptkit.com" target="_new">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts! </div> <div class="message"> <a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums. </div> <div class="message"> <a href="http://www.cssdrive.com">CSS Drive</a><br />Categorized CSS gallery and examples. </div> <div class="message"> <a href="http://www.javascriptkit.com/domref/">DOM Reference</a><br />This is a no-nonsense, easy to follow DOM reference for JavaScript. </div></div>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Interesting John, can you explain why that fixes the error?
DD Admin
I'm thinking it's most likely as the error itself tends to indicate. Firefox, possibly others, not IE (which gives no error because it sees the response text as text only) report this as like:
So I thought, what document? It's an xml document right? Well an xml document must have an overall opening and closing tag. In xml it doesn't matter what the tag is. Tags in xml may be user defined. But since we are importing this to an HTML document, may as well use a tag that will be valid there as well.junk after document element
Without an overall opening and closing tag, Firefox sees the first tag as the entire document, with the other div tags as "junk".
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks