[Javascript] Creating a new <Div>

Andrew Gibson andyg at ihug.co.nz
Sun Apr 14 23:26:18 CDT 2002


> You should probably reload the page's source code and add the div command
at
> the bottom.  You could also load the function into an IE IFRAME and then
add
> the div afterwards.
>
> ====================================
> Trey: tutwabee at hotmail.com

Thanks Trey. I looked in to the textrange object, but couldn't get it to
work, so I tried:

var myStr="<div id=myId></div>"
document.body.innerHTML=document.body.innerHTML+myStr

and this seems to do the trick without reloading the source!

Andrew Gibson
==============================================
Web Presentation Innovations: DHTML, Javascript, XML
http://www.dscript.net.nz








More information about the Javascript mailing list