Forum Moderators: open

Message Too Old, No Replies

Javascript SRC problem

not conforming to HTML validator

         

CNibbana

2:20 am on Dec 13, 2003 (gmt 0)

10+ Year Member



Until I learn to use XML RSS feeds to generate news on my homepage, I'm relying on a Javascript which calls the informtation from another site. Problem is, the Javascript causes validation errors with my HTML. Sample:

<script type="text/javascript" src="http://sample.com/geo/v1?n=6,eonl&hbc=f5f5f5& hfc=000080&hff=Arial&hfs=2&ibc=ffffff& ifc=3C3D73&iff=Arial&ifs=2&udd=1& ufc=999999&uff=Arial&ufs=2&ct=us& tz=UV&ts=990061200"></script>

The validator picks out errors such as "reference to entity 'hbc' for which no system identifier could be generated". However, these elements are nescessary to identify the font style, color, etc.

Is there any other way to use this Javascript that will get past the validator?

[edited by: korkus2000 at 2:40 am (utc) on Dec. 13, 2003]
[edit reason] fixed sidescroll [/edit]

DrDoc

5:52 pm on Dec 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want to put a literal ampersand (&) in your text you need to use the character entity for it, which is &amp;.

Replace all your &'s with &amp;

CNibbana

5:56 am on Dec 14, 2003 (gmt 0)

10+ Year Member



I ended up hiding it from the validator by putting it in an external .js file since I couldn't figure out any other way.