Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: XHTML valid...

  1. #1
    DecemberGuild is offline x10 Sophmore DecemberGuild is an unknown quantity at this point
    Join Date
    Oct 2006
    Posts
    107

    XHTML valid...

    I know there's another topic on this, but I didn't want to clutter or hijack the thread, so I'm posting this here.
    I have looked over the advanced and corporate ads, and I rewrote them to fit XHTML transitional and strict, as well as display neat, clean coding.
    I know that the advertisements must contain a certain line of code so the scanner can pick them up. All XHTML-required changes will be in red; if the scanner cannot pick up the script because of a red segment, then I recommend updating the scanner to fit the new internet standard of XHTML.
    Note: Green number tags are used to explain the change, and aren't part of the quoted code.


    Advanced
    Transitional:
    <script type='text/javascript'>(1)
    <!--
    if (!document.phpAds_used) document.phpAds_used = ',';
    phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

    document.write ("<" + "script type='text/javascript'(1) src='");
    document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:3&amp;target=_blank");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");
    //-->
    </script>
    <noscript>
    <a href='http://x10hosting.com/advert/adclick.php?n=a915c788' target='_blank'>
    <img src='http://x10hosting.com/advert/adview.php?what=zone:3&amp;n=a915c788' border='0' alt='' />(2)
    </a>
    </noscript>
    1: Removed the 'language' tag. XHTML uses only the 'type' tag and will consider any HTML page that uses 'language' invalid.
    2: Closed the image tag properly. This is important in XHTML.

    Strict:
    <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 type='text/javascript' src='");
    document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:3&amp;target=_blank");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");
    //-->
    </script>
    <noscript>
    <p>(1)
    <a href='http://x10hosting.com/advert/adclick.php?n=a915c788'>(2)
    <img src='http://x10hosting.com/advert/adview.php?what=zone:3&amp;n=a915c788' style='border-width:0px;'(3) alt='' />
    </a>
    </p>
    </noscript>
    1: The <a> tag must be wrapped in a <p> tag.
    2: Removed the 'target' tag. XHTML strict doesn't support this.
    3: Changed the 'border' tag. XHTML strict doesn't support this, and this must be done via CSS.


    Corporate
    Transitional:
    <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 type='text/javascript' src='");
    document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:1&amp;target=_blank");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");
    //-->
    </script>
    <noscript>
    <a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'>
    <img src='http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a7fb3e9d' border='0' alt='' />
    </a>
    </noscript>
    Strict:
    <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 type='text/javascript' src='");
    document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:1&amp;target=_blank");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");
    //-->
    </script>
    <noscript>
    <p>
    <a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d'>
    <img src='http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a7fb3e9d' style='border-width:0px;' alt='' />
    </a>
    </p>
    </noscript>
    All four of these codes have been run through the XHTML validator at the W3C website, and have passed. Let me know if these codes are acceptable.

  2. #2
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: XHTML valid...

    These should be acceptable, wait for Corey, Bryon, Alejandro, or Richard to give the ok, and I might sticky it.
    Thanks,
    Brandon Long

  3. #3
    yahia is offline x10 Sophmore yahia is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    Morocco
    Posts
    169

    Re: XHTML valid...

    I'm not looking for blindly (x)HTML approved code.
    Javascript shouldn't be inside the code; and even the thread you're refering to has a code where the JS code still in there, and still inside <!-- //-->
    => a hack of the 90s.

    Also, with true XHTML, document.write isn't allowed, or is dangerous for the webpage.
    And the Javascript code inside <script/> should be inside
    <![CDATA[ ............ ]]> or similar.

    The best way is to have an external file with all the javascript inside of it, like I suggested.

  4. #4
    nol888's Avatar
    nol888 is offline x10 Lieutenant nol888 is an unknown quantity at this point
    Join Date
    Oct 2006
    Posts
    292

    Re: XHTML valid...

    Quote Originally Posted by yahia View Post
    I'm not looking for blindly (x)HTML approved code.
    Javascript shouldn't be inside the code; and even the thread you're refering to has a code where the JS code still in there, and still inside <!-- //-->
    => a hack of the 90s.

    Also, with true XHTML, document.write isn't allowed, or is dangerous for the webpage.
    And the Javascript code inside <script/> should be inside
    <![CDATA[ ............ ]]> or similar.

    The best way is to have an external file with all the javascript inside of it, like I suggested.
    Even though, you should just be happy that x10 is giving you free web hosting with minimally invasive ads.
    You don't really need valid (X)HTML code either.
    This signature intentionally left blank.

  5. #5
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: XHTML valid...

    Exactly, we can try to provide you with the best solution, but if you want (x)html valid pages, try ad free. This ensures that the end user, you, can get what he/she wants without our ads interfering.
    Thanks,
    Brandon Long

  6. #6
    nol888's Avatar
    nol888 is offline x10 Lieutenant nol888 is an unknown quantity at this point
    Join Date
    Oct 2006
    Posts
    292

    Re: XHTML valid...

    True, still, those adjustments ARE valid, and Brandon seems to think it is ok, I just might use these. One more step toward validity! xD

    Edit: I mean that, towards yahia, for me, just having the javascript code vaildate, without passing all those "standards", is fine. Not all webpages have to be a stringent example of the "this-is-the-perfect-webpage-that-is-extremely-valid-and-all-people-have-to-follow-it-to-make-a-webpage" thing. Not all that stuff is needed, and if it validates at the bare minimum, that should be good enough =/
    Last edited by nol888; 01-02-2007 at 03:37 PM. Reason: clarification
    This signature intentionally left blank.

  7. #7
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: XHTML valid...

    I dont know but they should, might want for an admin to verify it.
    Thanks,
    Brandon Long

  8. #8
    nol888's Avatar
    nol888 is offline x10 Lieutenant nol888 is an unknown quantity at this point
    Join Date
    Oct 2006
    Posts
    292

    Re: XHTML valid...

    ok.

    i haven't used it yet, i read about letting an admin approve it first
    This signature intentionally left blank.

  9. #9
    Corey's Avatar
    Corey is offline VPS Migration Professional Corey is a glorious beacon of lightCorey is a glorious beacon of light
    Join Date
    Dec 2004
    Location
    Northfield, NH
    Posts
    17,151

    Re: XHTML valid...

    As long as the ads are shown correctly you can use the above modified code. We will look into modified code shortly to allow users some added freedom.

    -Corey

  10. #10
    nol888's Avatar
    nol888 is offline x10 Lieutenant nol888 is an unknown quantity at this point
    Join Date
    Oct 2006
    Posts
    292

    Re: XHTML valid...

    Yay! I'm putting the newly approved code in my webpage right now xD
    This signature intentionally left blank.

Closed Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Valid ad code as default
    By noerrorsfound in forum Feedback and Suggestions
    Replies: 0
    Last Post: 08-06-2006, 01:39 AM
  2. Have a problem with my forum
    By tikloos in forum Scripts & 3rd Party Apps
    Replies: 43
    Last Post: 01-19-2006, 01:14 AM
  3. errors while attaching
    By mattspec in forum Feedback and Suggestions
    Replies: 0
    Last Post: 12-19-2005, 01:50 PM
  4. November Desktop
    By n4tec in forum Off Topic
    Replies: 12
    Last Post: 11-08-2005, 07:18 AM
  5. Replies: 2
    Last Post: 10-16-2005, 12:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers