iFrame is not working...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    iFrame is not working...

    Code:
    var iFrame = document.createElement('IFRAME');
    iFrame.src = 'http://www.google.co.in';
    document.body.appendChild(iFrame);
    The IFrame is not getting loaded with the page..anything goes wrong with my code?
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    i changed the code little bit ..
    Code:
                    var iFrame = document.createElement('IFRAME');
    		iFrame.name = 'frame';
    		//iFrame.src = 'http://www.google.co.in';
    		document.body.appendChild(iFrame);
    		frames['frame'].location.href = 'http://www.google.co.in';
    now it's working ...

    Comment

    Working...