Is this acceptable?

Status
Not open for further replies.

noerrorsfound

New Member
Messages
1,736
Reaction score
1
Points
0
I am on the x10Advanced plan.

For XHTML 1.0 Strict validation, the ad code had to be slightly changed.
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><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="" /></a>
I only changed what was completely necessary for the code to comply with XHTML 1.0 Strict standards. Would this be acceptable?
 
Last edited:

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
It looks alright to me. :) What needed to be changed in order to get it compliant?
 

noerrorsfound

New Member
Messages
1,736
Reaction score
1
Points
0
Bryon said:
It looks alright to me. :) What needed to be changed in order to get it compliant?
Comparing mine to the normal one from http://forums.x10hosting.com/ads.php

The language='JavaScript' part was removed. Single quotes were changed to double quotes on the line starting with <script, and everywhere but inside the Javascript code. Inside the javascript, <'s were changed to &lt; and >'s were changed to &gt;. All &'s outside of the javascript were changed to &amp;. <noscript> and </noscript> were removed. target='_blank' was removed, as well as border='0'. Removing the border part caused the image in the code (yes, the advanced code contains an image, which is just a 1x1 pixel transparent gif, I don't know why but I assume it's needed) to have a border around it, which can be fixed with CSS. And a forward slash was added to the end of the img tag.

In XHTML 1.0 Transitional it's much simpler, just change the single quotes to doubles like how I did for strict, change & to &amp;, remove the noscript tags, and add the forward slash for the img. Transitional allows for depricated tags from html such as <center>, <u>, <i>, <b>, <font>, etc. So you can get away with more.
 
Last edited:
Status
Not open for further replies.
Top