Javascripts and XHTML Validation

I spent major time yesterday trying to validate a web site containing javascript lastly gave up and developed a workaround. It meant employing an IFRAME for the portion of the page where the script was named in. The script was for just a slideshow which included links. It was your links code how the validator disliked. Below may be the portion of the script so it did not for instance… am wondering in the event there was how to edit the code to make it " likeable" and not break it. Everything I tried did actually break it.

//Specify your slider’s images
var leftrightslide=new Array()
var finalslide=”
leftrightslide0='< some sort of href=" " > < img src=" examination. gif" border=" 1" alt=" " /> < /a> I

What seemed to be the error, exactly I can see a very few possibilities, although none that is going to show up given the fact the code is contained the next Javascript (blank alt characteristic, no width/height, and so forth. )

It only stated how the " a" tag was not allowed in which location. If MY SPOUSE AND I removed the ahref, then ?t had been happy.

That may be messed up. I would externalize the Javascript, while. External javascripts = not any validation issues.

Humm, I checked your page on a couple of different validators and both gave me the same miscalculation. Oh well, at least I have any work around into position.

I’d need to see the page along with the Javascript error on it to view what works. However again, saving your Javascripts in a very. JS file can be the better most viable option. It keeps a person’s Javascript separate through your HTML, allows you reuse it, and makes for client-side caching belonging to the script.

I accept using the /js file approach regularly. This particular script needed to be inserted in the body of the web site. Thanks for this thoughts.

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *