Product Strategist, Experience Designer & Code Tweaker 

Facebook Twitter LinkedIn
 
 
Home » Code is Poetry » How to load a HTML file into a Div
formats

How to load a HTML file into a Div

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…

 

2 Responses

  1. 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 )

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

    Do check out the demo’s there.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© Muthukumar Rajamani
credit