hey...
I know this is real easy to do and all...
but I just can't remember how to do it...

I have a textarea named 'code'

and a completely empty div

<div>
</div>

the textbox get's filled with html code...
(dynamically of course)

and now I need to display the html code in the div...
(using the textarea as a buffer)

how to?? :/

nvm... I figured it out

I really didn't want to waste a thread like this...

@ admins
if you want to delete this, go ahead

maybe this thread ain't so useless after all...

how do I get &apos; to work in IE??

well nvm that...
I can get away with using &quot;

just one more thing to figure out, and it should work perfectly...
and I think I might have an idea...
but still just in case...

instead of using:
window.onload = function() {...code...};
I need something that will work when I click Submit

I'm thinking to use the button to activate it...
still need to figure out how though...
but that'll be easy to figure out <_<

Either do <form onsubmit="function()"> or <input type="submit" onclick="function">.

well... you see...
I don't think it can be controlled like that...

the code is generated in a text box by the info you put into the program...
(a script generator perhaps)
this also includes a previewer that shows you the final output
the html part works fine...
but the js part doesn't...

it's used to create a scrolling image viewer based on the pointer location...
the code doesn't work in the sense that it uses window.onload

here's the generated code in the textbox:

<script type="text/javascript">
window.onload = function() {
document.getElementById("HID_1").innerHTML = "";
var img = new rotator.rotator([
"",
"",
""]);
img.appendTo("HID_1");}
</script>

<table class="good"><tr><td><table cellpadding="0" class="ch">
<tr><td><br>Hack by Author<br>
<a href="http://" class="link">Download:.</a><br><br></td></tr>
<tr><td class="ch_img" id="HID_1">Loading...</td></tr>
<tr><td class="comment"><br>Comment Here<br><br></td></tr>
</table></td></tr></table>

as you can see, it needs some work...
is there a better way instead of using 'window.onload'
what else can I use

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.