Javascript in a panel

I’m trying to make a dynamic html panel that will change its contents according to certain user inputs… yadda yadda…

I have that much set up, but I want to make it marque across a bar without using the annoying marque HTML tag (which is jumpy and I don’t like it). I have a method to do this with javascript, but I can’t seem to get the javascript code to run… at all… I’ve tried the HTML:RunJavascript(), HTML:Exec(), and I’ve even tried just typing the javascript into the code for HTML:SetHTML()… No good… I just can’t get it to work at all, no matter what javascript code I use… Even


won’t work…

Does anyone know how to make javascript work with SetHTML()?


I said I tried that… Please read everything I posted above if you can… ^^’

It won’t work, the JavaScript refuses to run no matter what function I try… Is the context strange at all? Does it dislike declaring javascript functions within the string? Can it not be right below the SetHTML function? Anything rather odd about it that might keep it from working?..

If I weren’t afraid of someone stealing the code, I’d post it here and ask what’s wrong… But basically, it’s along the lines of:

//Yes, I made sure the HTML panel is a local variable for the entire lua file
//not one function/block.

local **Page**=vgui.Create("HTML")

//....Later that code....

**Content**=[[ <html><head><title>Page Title</title></head>
<body>Blah]]**..UserInputVariable..**[[ blah blah, main content.</body>
</html> ]]

//The UserInputVariable is where I concatenated some kind of user input
// declared elsewhere in the code.


**Page**:RunJavascript([[ document.body.innerHTML='This will not work'; ]])

//Not the javascript I want to run, but it shows that it will not run for me...