Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts

    Validating Server-Side Script Pages

    I was wondering if anyone knows how to validate a page when it is written in PHP? (I know that there's no "PHP Validator"; I want to know how to validate the HTML output from the PHP page.) My whole site is written in PHP and uses many files to put together on page. Of course, I can validate the final output code that is generated, but then I have to go back when there is an error, find which file it is in, and change that. That method is also much more work-intensive. I'm Lazy. I want to be able to type the URL in to the validator, instead of pasting the source code each time

    Any comments are apreciated

    Dan

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Then type the url, the validator should get the parsed version. Quit being lazy, web design isn't a job you can be lazy in.

  • #3
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Thanks. That worked. I could've sworn I'd tryed that, but I guess I didn't. I was only kidding about the "being lazy". I do enjoy solving all the quirks and problems that come with web design.

    Dan

    PS I also have one more question. I do not use Javascript that much, so this has never arisen before. The Validator is giving me lots of errors related to the javascript coding I have. How can i make the validator ignore the javascript?
    Last edited by whizard; 11-25-2005 at 04:47 PM.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Use proper comments. In XHTML you need to use a certain type of comment for embedded javascript or you could just put the JS in an external JS file and use the src attribute to reference it in the script tags.

  • #5
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Thanks for all your input!

    I assume by "special comments" you mean putting this after the script tag: <![CDATA[
    and this before the /script tag: ]]>

    Dan

  • #6
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    YES! Validation achieved... The sweet feel of success...

    Thanks Aero for everthing

    Dan

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    PHP Code:
    <script type="text/javascript">
    //<![CDATA[
    Your script
    //]]>
    </script> 

  • #8
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Yeah, I got that. Thanks for steering me in the right direction on this.

    Dan


  •  

    Posting Permissions

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