Hi, i am trying to validate some page with xhtml validator, for the following part i got errors.
Anyone knows what does it want?
Error: "document type does not allow element "img" here", and it points to the closing part of the mg tag ('>'). now when try to replace < with < and > with > validator is fine with that, but then the browser (firefox) shows the actual text and not the image....
document.getElementById('myImage').innerHTML = (document.all ? '' : " <img src='image.gif' alt='' />");
any help plz?
You need to wrap the code in a CDATA section.
tnx, that convinced the validator
should i put some header about xml in the page ?
I am getting syntax error in java script console for the <![CDATA[ .....
Last edited by TrolloC; 04-16-2005 at 06:49 AM.
Sorry, I should have mentioned that you'll need to comment out the CDATA section as well. Fortunately, the JS comment characters aren't XML special characters, so you can do this:
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)