Challenge to anyone interested (please forgive the long explanation):
The code below is supposed to display looping images from 4 radar sites. Note that each site is centered within its own iframe.
I assigned each image as a background to its respective iframe. Since each image is larger than the iframe that contains it, this allows me to center the image on each radar location within the smaller iframe.
Now the problem! This code only works like it should (i.e. displaying looping images in each iframe) in the Firefox and Opera browsers. It won't work at all in IE. In Google Chrome, it only works correctly in the upper left iframe, and has trouble even loading the images in the other iframes. And in the Safari browser, although it is able to display all the radar images, it seems that only the upper left iframe loops consistently.
Note that I have only worked with HTML 4.01, and I am hoping SOMEONE can figure out what I need to do to get this code to work correctly in IE, Google Chrome, and Safari browsers. I did run it through a CSE HTML Validator and it looked OK.
Thanks much. Henry
____________________________________________________________
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
You should be using div or img tags - not iframe to attach those images (div if they are irrelevant to the page and are just background decoration behind content and img if they are supposed to be part of the page content. Anyway as background it makes no difference whether the browser displays them or not.
Location: Splendora, Texas, United States of America
Posts: 2,900
Thanks: 5
Thanked 188 Times in 185 Posts
Quote:
Originally Posted by hsteiger
I assigned each image as a background to its respective iframe. Since each image is larger than the iframe that contains it, this allows me to center the image on each radar location within the smaller iframe.
This is not proper use of an iframe element, which is supposed to be used to display content external to the current document.
Quote:
Originally Posted by hsteiger
Now the problem! This code only works like it should (i.e. displaying looping images in each iframe) in the Firefox and Opera browsers. It won't work at all in IE. In Google Chrome, it only works correctly in the upper left iframe, and has trouble even loading the images in the other iframes. And in the Safari browser, although it is able to display all the radar images, it seems that only the upper left iframe loops consistently.
Your code works for me in Firefox 19, Opera 12.1, and WIE10 out of the box. I have to use a Maximize or Restore Down command to get the images to display properly in Chrome 26; otherwise, your code works in that browser as well. I'm on a Windows machine, so I can't check your code in Safari.
Quote:
Originally Posted by hsteiger
Note that I have only worked with HTML 4.01, and I am hoping SOMEONE can figure out what I need to do to get this code to work correctly in IE, Google Chrome, and Safari browsers. I did run it through a CSE HTML Validator and it looked OK.
I was able to get a properly coded HTML5 solution working with a bit of trouble. It works in all of the aforementioned browsers, but probably not so much in older browsers:
Location: Splendora, Texas, United States of America
Posts: 2,900
Thanks: 5
Thanked 188 Times in 185 Posts
Quote:
Originally Posted by SirPrize
Do people still use iframes?
Seriously, I'm curious to how they're actually meant to be used.
They're used to import third-party content that you don't control. For example, you might import a YouTube video or a Facebook chat stream as has been done at http://thinkprogress.org/economy/201...e-protections/.
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *
I have never been used iframe before but if you used div in properly than it will be worked.
Judging from your English, Andy Skipper is not your real name, is it?
__________________ Frank
How to: Target IE in, Position in, Center in, Create a Fixed ('Sticky') Footer with, and Create a Drop-Down/Fly-Out Menu with CSS: Website Laten Maken Amsterdam.
I'm on a Windows machine, so I can't check your code in Safari.
Why not - Safari has been available for windows since version 3 came out.
The only reason for still using an <iframe> tag now is IE7 which doesn't allow the border to be turned off if you do it properly using an <object> tag instead. All other browsers now support using the standard <object> tag for embedding one HTML inside another so that you no longer need to use the antiquated non-standard iframe tag for that purpose.
Location: Splendora, Texas, United States of America
Posts: 2,900
Thanks: 5
Thanked 188 Times in 185 Posts
Quote:
Originally Posted by felgall
Why not - Safari has been available for windows since version 3 came out.
Safari on Windows is dead. Apple quietly discontinued support for it quite some time ago (May 9, 2012 per Wikipedia).
Quote:
Originally Posted by felgall
The only reason for still using an <iframe> tag now is IE7 which doesn't allow the border to be turned off if you do it properly using an <object> tag instead. All other browsers now support using the standard <object> tag for embedding one HTML inside another so that you no longer need to use the antiquated non-standard iframe tag for that purpose.
In the modern world (HTML5), an iframe element should be used to display (third-party) HTML documents because that's the element designed for that purpose.
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *