Why are iframes bad?
Surely there must be situations where it is better than a DIV?
Why are iframes bad?
Surely there must be situations where it is better than a DIV?
[FONT=Trebuchet MS][SIZE=2]Hi QNC —
The only bad thing about an IFRAME is that you have to specify the height and width. Other than that I think they are a great solution for on the fly updates where you need to access the server, if you don’t want to use Java and servlets. In my opinion they are mostly good. Google Maps (as of today – Beta) uses iframes, and very well. They (Google Maps) provide that on-the-fly look and feel.
The only other problem – most people don’t use iframes and frames correctly so it tends to negate their benefits.
An iframe over a div…? I would compare an iframe with Java Applets/Servlets.
I would compare div tags with span or p tags…
Q…
[/SIZE][/FONT]
yeah id say there is nothing wrong with iframes.
I dont like regular old frames, but iframes certainly have their uses.
I use IFRAMES for client sites who need to be able to update a page with current news or something that is easier for them to update.
What is bad about Iframes can be summed up in one word “Accessiblity”. Iframes can not be seen by many handhelds, nor can it be seen by text browsers. They could also cause problems for disabled users who use screen readers or dynamic Braille displays.
With that said, they can serve their purpose if used with this limitation in mind.
cool more confident about that approach to my
http://www.qnctv.com/testbed/firstphp/showsindex/scroll_pure.php
page as then the independant sort can be done with out fancy code.
I suppose I can collapse each one using javascript or a total page reload in php for those who have javascript turned of?
Do i need to worry about seacrh engines as links are returned from a databse anyway I guess there is a way for them acces it anyway?
Where is a good place to learn about proper use of iframes?
I run a site for my archery club and I have found that the IFrame has been the easy way of changing the upcomming event that is posted on all of the pages.
Many time people only go to one page so in order for the upcoming events to be posted on I used to have to edit 14 different page with the new upcoming events but now all I do is edit one or two files and it is now on all the pages.
Yes it a little trickey using them, I looked at a dozen pages and then beat it with a big hammer but it work. I do have one problem is that I am using HTML-Kit and it shows the Iframe one way , but it is different from Firefox and IE 6.0 is different from the other 2 … Oh well it fun beating you head againist the wall sometimes.
If you want to use Iframes do google and just play around with them.
Ti Yogi Bowmen
i don’t see a huge problem with iframes. i tend to use them by sticking them inside of a div >_>
the only thing you’ve gotta be careful with is to make sure you’ve got all your target=“” things correct for your links outside the frame, or it wont be fun -_-‘’
aside from that, i think they work well.
Humm tried sticking them inside a DIV but got problems when it came to css any clues
http://qnctv.com/testbed/firstphp/showsindex/iframepost.php
this page works really well in terms of upload to iframes but the css cross browser is woeful utterly woeful it works in firefox on mac and pc but i.e. 6 on pc the boarders are really bad on safari I get half columbs all on one side. i.e 5.2 on mac they all go down the page instead of side by side!!
Here is the style sheet i am currently using which I got from paul OB here on sitepoint much improved on what I had but still not ideal.
<style type=“text/css”>
html>body iframe{width:60%}
iframe {
width: 15%;
height: 250px;
margin: 0% 1%;
padding: 1%;
}
#wrapper{text-align:center;}
span{
background:#000066;
display:inline-block;
}
html>body span{display:table-cell;width:15%}
</style>
any help would be appreciated
Server-side includes would be much better for that, though.
How do you mean better than iframes does server side includes mean xml stuff?
But as I stated, I do not know how to do sever-side stuff so I use Iframes.
I do not even know what to google for to find out. What would I search for??
Also could you give a brief simple example?
Aslong as the server you are using allows for it you simply have to create one page and then include the code for that on all your pages.
For example if you put the following code
<!–#include file=“events.html” –>
On all your pages then whatever was on events.html would appear in that spot on your page. Then you would only have to update it in one place and have no need for Iframes
<joking>Ignorance is no excuse!</joking>
Your server must allow server-side includes. Simple SSI works like csswiz says (or like this for an absolute URI)
<!-- #include virtual="/path/to/events.shtml" -->
You will sometimes be forced to change the file extension from “.html” to “.shtml” to make the server parse the file for SSI.
Another option is to use a server-side scripting language / technique, such as PHP, JSP, or ASP. Again, your server must be configured with the proper software, and you must have permission to use it.
Why do you think so? I am still unclear about the advantages and disadvantages of iframes, but I was thinking of using them to get away from server side includes. The idea was it would put less load on the server with no parseing, and allow for better use of the client side cache. So I was viewing ifrmaes as maybe being client side includes, and being a win over server side includes all around.
ok I ran a small test with the following code and I did see the test inside of the page . So there for I have SSI capablilities.
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<title>testing_shtm</title>
</head>
<body>
<BODY BGCOLOR=“#FFFFFF” TEXT=“#000000”>
<P>This is the SSI test<br />
do I see text below here?</P>
<P><!–#include virtual=“ssi_test.txt” –></P>
</body>
</html>
As to the above quote this is what I am doing with Iframes so again I do not see the advantage.
How would I implement this to show 2 html’s side by side? Would I use 2 floating divisions inside a container like I use for my Iframes?
This is what I am doing now.
<div id="iframe_con">
<iframe id="iframe_01" scrolling="no"
src="../menu_css/iframe01.html" frameborder="1"></iframe>
<!-- scrolling attribute must be here to work -->
<iframe id="iframe_02" scrolling="no"
src="../menu_css/iframe02.html" frameborder="1"></iframe>
<!-- scrolling attribute must be here to work -->
</div>
One advantage I see in using Iframes is I can check to see how it works with out having to uplaod the file and then view it. This I can not do with SSI method.
Doing things server side is definitely preferable to doing them client side. Why? Because you know your server. You know exactly what it can and cannot do. If it works when you test it, it will work for every visitor. What do you know about your visitors’ computers and browsers? Things that work like a charm in Firefox on Windows XP may fall apart in IE 5.23 on a Mac, or Lynx 2.8.3 on Linux, or an Opera browser in a mobile phone.
Why is SSI/SSS better than JavaScript? Because not every user agent supports JavaScript, and some visitors will have it disabled.
Why is SSI/SSS better than IFRAME? Because not every user agent supports IFRAME, and you will have to provide an alternate version in your markup.
Transferring the load from your server to the visitors’ clients sound rather rude to me.
I’ve had some projects in iframe and I think it’s nice. Just one line of code and I can have my layout for the page and the other pages in it. I’ve made sites that can load faster this way and since I was on dial-up till 1 month ago, it did make a difference
Ah, but I did not transfer load from my server to the visitors, I reduced the load all around, including on the global netowork bandwidth. Doing things client side is fine, and much more scalable as long as you remember to degrade gracefully. What I hate are flash pages where all I see are big empty spaces.
I put a link for non IFRAME browsers to get to the news page. Using more server resources on a (potential shared) server, and breaking caching needlessly seems rather rude to me!
So far I have not read anything to make me reconsider my idea to start to replace more ssi pages with iframes in the near future.
now on
http://qnctv.com/testbed/firstphp/showsindex/iframepost.php
I have used iframes why?
each columb can load individually not the whole page
I usually use php to do include files so ssi is not a million miles away from what I have used before.
the basic problem is therefore do i recreate the side by side iframes using ssi/php includes?
So with ssi/php:
would I get scroll bars?
is it more cssable and cross browser friendly than iframes?
would I/client have to reload the whole page to get a chnage in one coloumb?
is there a way to make xmlhttp acces object cross browser?
I only need it one page the choices/pick content page?
the columbs can be generated dynamically so if the databse returns only stuff from movies only that columb will appear can this be doen with ssi
on php it can be
if ($result == something to display in movie coloumb {
echo "<iframe src=/"../displaypage.php?result=$result/"></iframe>";
}
andif ($result2 == something to display in another coloumb {
echo "<iframe src=/"../displaypage.php?result=$result2/"></iframe>";
}
I suppose for ssi echo would be echo <!–#include file=“…/displaypage.php?result=$result/”" –>
assuming ssi can pass the $result to the page as it is requested?
in pure php it would be
include(…/displaypage.php?result=$result/";
insted of echo?
So again the only question is will I have scroll control and would the whole page have to reload?
What do people think?