Rachel Nabors ([info]crowhen) wrote,
@ 2008-05-15 00:07:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
W3C compliant javascript help needed.
The javascript the new site gives users to put on their own sites to display banners, it no validate over at W3C. Does anyone here know enough about validating Javascript to help me on this one? CSS and HTML I can bring up to code, but scripts I'm not so good at.



(Post a new comment)


[info]kimonos_house
2008-05-15 04:42 pm UTC (link)
What error is it giving you? I'm no good at scripts, either, but the error I get most often is from placing a script in an invalid element.

(Reply to this) (Thread)


[info]crowhen
2008-05-15 09:06 pm UTC (link)
What is your email? I will send you a copy. Further more, what DOCTYPE declaration are you using? I'm aiming at XHTML Transitional, possibly frames as it pops it into a new window. You could remove the target property on your own, though.

(Reply to this) (Parent)


[info]terrestrial_cel
2008-05-15 06:50 pm UTC (link)
W3C validators will usually be nice and tell you where the problem is and what's expected to be there. Of course if there's more than a handful of issues in the document, it can be time consuming to hand fix every problem.

Some text editors come with tools that will clean up and help you validate javascript. In the text-editor jEdit, for example, there's a plugin for that.

If your javascript is inline, which I'm assuming it is now, your task might be a tad bit trickier. As the validation often relys on the doctype. If you're using a strict doctype on your page, and a member puts your banner code on a transitional doctype, there might be different errors. In cases like these, it might be better to make sure it works on most modern browsers, and let some standards slide. It's icky and unsanitary but remember the old saying "What, not how".

If your javascript just doesn't seem to be working properly, might want to try this guy on for size:
http://www.jcay.com/javascript-code-improver.html



(Reply to this) (Thread)


[info]crowhen
2008-05-15 09:03 pm UTC (link)
Problem is, I am running it through as transitional XHTML at W3C, and they are telling me what's wrong, only I don't know how to fix it because I don't know Javascript. Like "You can't put a + here." What? What should I put there? Huh?

I need to run it past someone who's got experience with compliant scripting, I think. I'm just not experienced enough.

(Reply to this) (Parent)


[info]crowhen
2008-05-15 09:04 pm UTC (link)
And I can't launch the site until the code is compliant. Sigh.

(Reply to this) (Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…