th1666
07-10-2008, 12:17 AM
Hello.
I'm using Javascript to replace a div with certain content when selected from a menu on the side of the page, so whatever I click will show a certain video in the div.
The problem is, when I'm specifying what I want to put in the div, the quotes from the embed code end the line.
This is what I have:
videoArray[18] = "<h1>Before I Forget</h1><p>EMBEDDED VIDEO CODE</p>";
So the quotation marks in the video code stop the valuing of the array short.
Is there anyway I could stop the quotes from doing that? Could I have it get the embed code from somewhere else?
I'm using Javascript to replace a div with certain content when selected from a menu on the side of the page, so whatever I click will show a certain video in the div.
The problem is, when I'm specifying what I want to put in the div, the quotes from the embed code end the line.
This is what I have:
videoArray[18] = "<h1>Before I Forget</h1><p>EMBEDDED VIDEO CODE</p>";
So the quotation marks in the video code stop the valuing of the array short.
Is there anyway I could stop the quotes from doing that? Could I have it get the embed code from somewhere else?