How to load a HTML file into a Div

June 8, 2007 – 4:03 am

Used an “onclick function” and successfully loaded a HTML file into a Div.

JavaScript: onclick=function(){ var el=document.getElementById("x") el.innerHTML="iframe src=\"http://muthuonline.com/about_muthu\" >"
< div id="x">

Wish there was an easier method like having a src for a div.

However had issues setting the iframe width. After getting this done, i was told that iframe kinda outdated. Next, i guess i have to do the inevitable…

  1. 2 Responses to “How to load a HTML file into a Div”

  2. hi,

    i’m working on an end-user programmiong experiment project called “The Returnable Project”.

    Right now ,you can load content into div’s, etc by saying using the onhover,onclick API. I’m working on the onload.

    So ,this way you get a cool html api for adding intuitive behaviour to web pages. This is the motive of the Returnable Project itself.

    see you at bcb 4..

    Keep Clicking,
    Bhasker V Kode 8 )

    By Bhasker V Kode on Jul 23, 2007

  3. oops…here’s the link http://returnable.org

    Do check out the demo’s there.

    By Bhasker V Kode on Jul 23, 2007

Post a Comment