In message <57e4a64755.iyojohn@rickman.argonet.co.uk>
John Rickman Iyonix <rickman@argonet.co.uk> wrote:
>John Rickman Iyonix wrote
>
>> http://rickman.orpheusweb.co.uk/testing/test5.html
>
>> I have now traced the problem to an error in my code. I need to fix
>> the problem and try again.
>
>My javascript is now working. the problem was that the new interpreter
>does not like html comments between the <script> and </script> tags.
>
> <!DOCTYPE HTML>
> <html><head> <title>Bakehouse-Cyber</title></head><body>
> <script>
> <!-- here is some javascript -->
> document.write("hello world");
> </script>
> </body> </html>
>
>As far as I know javascript should ignore html comments and the
>javascript validator does not flag them as errors
>
> http://www.javascriptlint.com/online_lint.php
My O'Reilly Javascript book tells me that Javascript supports C-
style and C++-style comments. The only mention of HTML-style
comments relates to really, really, old browsers.
I think your code above is genuinely wrong, although I guess
it might be supported by some browsers that are deliberately
written to be tolerant of errors.
I'd recommens that you change your comment line to:
// here is some javascript
Dave
____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!
No comments:
Post a Comment