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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation </script> tag won't validate (!!)

    Hello,

    I'm a newbie (to this forum - and to javascript). I've just finished my portfolio website and am trying to validate it @ http://www.w3schools.com/site/site_validate.asp but it keeps coming up with the error:

    Error Line 20 column 8: end tag for element "script" which is not open.
    </script>
    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.


    Does anyone know how I can fix this please? Without me having to do external styles or scrapping the script altogether. (Please view source on my index.html file for code).

    Here's my website address: http://www.superkooge.com/

    Any help greatly appreciated. Cheers!
    Last edited by mknz; 06-07-2007 at 12:19 PM. Reason: Forgot to include link

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    superkooge.com/index.html: lines 8-20
    Code:
    <script src="AC_OETags.js" type="text/javascript"></script>
    <!--
    // 
    // Globals
    // Major version of Flash required
    var requiredMajorVersion = 8;
    // Minor version of Flash required
    var requiredMinorVersion = 0;
    // Minor version of Flash required
    var requiredRevision = 0;
    // 
    // -->
    </script>
    You've closed the script element on the same line that you open it.
    The later closing </script> tag relates to no opening <script> tag - hence the error.

    You can't embed js within a srced script element.
    If you want to use both external and embedded js, you'll need to use two script elements.

    Code:
    <script src="AC_OETags.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    // 
    // Globals
    // Major version of Flash required
    var requiredMajorVersion = 8;
    // Minor version of Flash required
    var requiredMinorVersion = 0;
    // Minor version of Flash required
    var requiredRevision = 0;
    // 
    // -->
    </script>
    Be certain to look more closely at the text of the errors, and particular the code on the lines where the errors are reported to appear.
    Last edited by Bill Posters; 06-07-2007 at 12:43 PM.

  • #3
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Awesome thankyou so much. It works perfectly now. My apologies, that was a complete oversight. I should've noticed that.

    Thanks again.


  •  

    Posting Permissions

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