SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict Johana Solendhal's Avatar
    Join Date
    Aug 2004
    Location
    Land of the free
    Posts
    252
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it even possible to make this little code XHTML strict?

    Hello muchachos!!

    I am using a PHP Live to provide support on a website. However, the generated HTML is not XHTML strict.

    Is there a way to make this code W3C compliant without "breaking" it?


    HTML Code:
    <!-- BEGIN PHP Live! code, (c) OSI Codes Inc. -->
    <script src="http://www.mysite.com/apoio/js/status_image.php?base_url=http://www.mysite.com/apoio&amp;l=flores&amp;x=1&amp;deptid=2&amp;" type="text/javascript"><a href="/apoio/setup/code.php"></a></script>
    <!-- END PHP Live! code : (c) OSI Codes Inc. -->
    Gracias!!

  2. #2
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's also invalid HTML, FWIW.
    HTML Code:
    <script src="http://www.mysite.com/apoio/js/status_image.php?base_url=http://www.mysite.com/apoio&amp;l=flores&amp;x=1&amp;deptid=2&amp;" type="text/javascript"></script>
    Simon Pieters

  3. #3
    SitePoint Addict Johana Solendhal's Avatar
    Join Date
    Aug 2004
    Location
    Land of the free
    Posts
    252
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, but I prety much knew I could place that achor inside the script. But removing it "breaks" the script.

    Is there an alternative?

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    London, UK
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't even know that you can put HTML inside a <script> tag.
    Try this if the XHTML Strict validation error is with the <a> tag not having a content.
    Code:
    <!-- BEGIN PHP Live! code, (c) OSI Codes Inc. --> <script src="http://www.mysite.com/apoio/js/status_image.php?base_url=http://www.mysite.com/apoio&amp;l=flores&amp;x=1&amp;deptid=2&amp;" type="text/javascript"><a href="/apoio/setup/code.php" style="display:none">.</a></script> <!-- END PHP Live! code : (c) OSI Codes Inc. -->

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by peterbe
    I didn't even know that you can put HTML inside a <script> tag.
    You can't. It's invalid JavaScript and the closing tag will close the SCRIPT element (in HTML).
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •