Ad Code - Produces just a small WC3 Vali Error

Status
Not open for further replies.

poringy

New Member
Messages
95
Reaction score
0
Points
0
I know this is a bit small, but the ad code produces an ampersand with variable error. This is the only thing that makes my site from becoming 100% WC3 cross browser compatible. Does this bother anyone?
 

Cynical

Active Member
Messages
3,492
Reaction score
0
Points
36
Yeah, this has been discussed before, I'll see if I can dig up the old topic.. I think someone posted a revised code there. Regardless, it is pretty easy to fix (though I don't know why we have the invalid one up). Just change <script language="Javascript" to <script type="text/javascript" and replace each & with &amp;.
 

noerrorsfound

New Member
Messages
1,736
Reaction score
1
Points
0
x10Advanced:
Code:
<script type="text/javascript">
<!--
   if (!document.phpAds_used) document.phpAds_used = ',';
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   
   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
   document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
   document.write ("&what=zone:3&target=_blank");
   document.write ("&exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&referer=" + escape(document.referrer));
   document.write ("'><" + "/script>");
//-->

</script><noscript><div><a href="http://x10hosting.com/advert/adclick.php?n=a915c788"><img src="http://x10hosting.com/advert/adview.php?what=zone:3&amp;n=a915c788" alt="" style="border:0" /></a></div></noscript>
This is valid XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.

Some of these changes were not needed to make it valid XHTML 1.0 Transitional, but having them allows the same code to be used for all three.

I created a thread previously asking why they couldn't just make the valid ad code the default, but I did not receive a response.
 
Last edited:

poringy

New Member
Messages
95
Reaction score
0
Points
0
Hey, thanks for all the replies! I prefer to put in the clean php form of the code, so I can't really change the ampersand signs unless I use mod_rewrite. I'll hope that you guys will make the valid one the default. Thanks!
 

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
Copy each code just how it is, any modification to it will result in a suspension.
It says that in the "Ads" section..
 

DizzyTechnology

New Member
Messages
500
Reaction score
0
Points
0
The generic code (e.g., the javascript and image def) is what they check; that is the response I received. To even improve compatibility, I added a alt="" tag along to the fixes. I've had my account that way for over ten months now, and nobody's had a problem with it.
 
Status
Not open for further replies.
Top