This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
still having trouble using // in javascripts document.write

I am using external javascripts in my website for my menus with links. Most of my links are to files within my own direcories - which works fine with javascript, but I have a problem whenever I want to create a link to web pages outside of my directories. I think this is because it is necessary to say (a href="http://) and the // is interpreted by javascript as a comment. Thus, everthing after the // is taken as a comment. I tried to use backslash escape characters before each forward slash and it still didn't work. If I want to print "//" from javascript, how do I make it not treat the information after the "//" as a comment?

Re: still having trouble using // in javascripts document.write

http://www.wombat.com/happy.html works fine for me within a document write statement

Re: Re: still having trouble using // in javascripts document.write

you're right. I could have sworn it wasn't working, but I just tried it and it did. Thanks.

Re: Re: Re: still having trouble using // in javascripts document.write

Be careful when you need to embed quotes or apostrophes.