www.webdeveloper.com
Results 1 to 2 of 2

Thread: Iframes not refreshing when button pressed Did i **** up somewhere ?

  1. #1
    Join Date
    Aug 2012
    Location
    Hull, England
    Posts
    5

    Iframes not refreshing when button pressed Did i **** up somewhere ?

    Hello,
    ive wrote this for my page the iframes load normally but the buttons i added to refresh the individual frames just dont work.. Any ideas ??

    Code:
    <html>
    <head> <body> <iframe id="iframe1" height="200" width="200" src="http://google.com"></iframe> <br> <input type="button" value="Reload Google" onclick="Reload ();">
    
     <iframe id="iframe2" height="200" width="200" src="http://m.twitter.com"></iframe> <br> <input type="button" value="Reload Twitter" onclick="Reload ();">
    </body>
    
    
    </body>
    </head>
    </html>

  2. #2
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,096
    Google and Twitter block their pages from being encased in iFrames.
    CNN, Facebook and many other pages do this these days.

    I did what you wanted in a JSFiddle and it works fine for Yahoo and Fox News.

    http://jsfiddle.net/smVdU/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles