SitePoint Sponsor |
|
User Tag List
Results 1 to 24 of 24
Thread: Is IFRAME ok?
-
Oct 23, 2006, 03:27 #1
- Join Date
- Jan 2005
- Location
- Sipovo
- Posts
- 59
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Is IFRAME ok?
IFRame is deprecated in HTML 4.x/XHTML 1.0. Dropped in XHTML 1.1.
What should I use? Divs with overflow? How to scroll content so that last lines are visible not first?
-
Oct 23, 2006, 04:10 #2
I'd use div.
To scroll down to the bottom, you could use some JavaScript:
HTML Code:<div id="div1" class="dv1"> <!-- content --> </div> <script type="text/javascript"> div1=document.getElementById('div1'); div1.scrollTop = div1.scrollHeight; </script>
Saul
-
Oct 23, 2006, 04:34 #3
few years of patience and you'l be able to use xframes, the successor of frames
-
Oct 23, 2006, 04:53 #4
- Join Date
- Jan 2005
- Location
- Sipovo
- Posts
- 59
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for response. It works in Firefox and Opera ok. It works in IE for first page load, but when I refresh page, content is scrolled only half way down.
Any suggestion?
-
Oct 23, 2006, 06:04 #5IFRame is deprecated in HTML 4.x/XHTML 1.0. Dropped in XHTML 1.1.
-
Oct 23, 2006, 06:52 #6
- Join Date
- Dec 2002
- Location
- Aylmer, QC, Canada
- Posts
- 409
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by drhowarddrfine
Going through the list of elements from the W3 site ... there's no "D" on there in the "Depr" column beside IFRAME to state that it is.
So ... who told you that?
-
Oct 23, 2006, 07:24 #7
- Join Date
- Jan 2005
- Location
- Sipovo
- Posts
- 59
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
+100
Thanks a lot, you really helped me
I din't ask this in order to argue, but to learn. W3C site is real nightmare for me, so I asked.
My question was really simple: should I use IFrame, or something else in xHTML 1.1, since page with iframe does NOT pass html validation?
-
Oct 23, 2006, 07:37 #8page with iframe does NOT pass html validation?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
should I use IFrame, or something else in xHTML 1.1
-
Oct 23, 2006, 08:30 #9
- Join Date
- Dec 2002
- Location
- Aylmer, QC, Canada
- Posts
- 409
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If what drhowarddrfine said didn't help, give us a link so we can check it out.
-
Oct 23, 2006, 08:43 #10
- Join Date
- Jan 2005
- Location
- Sipovo
- Posts
- 59
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
drhowarddrfine didn't try to help. He/she just wanted to prove that I'm wrong, and that IFrame is not deprecated so it is safe to use it.
I would appreciate responses like one of php_daemon more, but ok.
Can someone comment this topic: http://www.sitepoint.com/forums/show....php?t=431848? I might be wrong again, but please, please try to focus on my problem not on proving that I'm wrong.
-
Oct 23, 2006, 09:32 #11
- Join Date
- Dec 2002
- Location
- Aylmer, QC, Canada
- Posts
- 409
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
IFRAME is NOT deprecated!
This is perfectly valid code
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <iframe src="foo.html" width="400" height="500" scrolling="auto" frameborder="1"> [Your user agent does not support frames or is currently configured not to display frames. However, you may visit <a href="foo.html">the related document.</a>] </iframe> </body> </html>
-
Oct 23, 2006, 10:07 #12
- Join Date
- May 2006
- Location
- Aurora, Illinois
- Posts
- 15,476
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
As others have told you, iFrames are perfectly acceptable to use in HTML 4.01 and XHTML 1.0 frameset and transitional DOCTYPEs.
If you don't want to use iFrames (and if I'm reading this right, you're using XHTML 1.1, which means you pretty much have no choice if you want your page to validate), you basically have two choices. One is to use the OBJECT element to insert your other page (you'll have to use conditional comments and a DIV for IE) or to use a DIV in conjunction with either server-side includes (SSI) or a server-side programming language like ASP, PHP, or Perl to "include" your document into the main page.
As in cases like this I find both to be rather messy, I tend to stick with iFrames (keep in mind I rarely use iFrames anyway). If you'd like to learn more, go to www.w3schools.com (no affiliation with the W3C itself) and check it out for yourself. Their reference on iFrames is here:
http://www.w3schools.com/tags/tag_iframe.asp
Just keep in mind that if you go with iFrames (and want the page to validate) you won't be able to use a Strict HTML 4.01 or XHTML 1.0 DOCTYPE or XHTML 1.1 either. It's unfortunate, but that's the way the proverbial cookie crumbles.
If you still need help, feel free to post here and one of us will be more than happy to.Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
-
Oct 23, 2006, 11:07 #13
Originally Posted by papaja
It works on IE7, maybe it's just the right time to forget about the oldies and move on.Saul
-
Oct 23, 2006, 11:38 #14
- Join Date
- May 2006
- Location
- Aurora, Illinois
- Posts
- 15,476
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
IE 7 will only install on Windows XP and Vista. A lot of people still use Windows 98SE and 2000, and a few still use Windows ME.
In other words, Internet Explorer 6 is like the monkey in "Pirates of the Carribean 2" - it WILL NOT DIE.Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
-
Oct 23, 2006, 12:02 #15
- Join Date
- Dec 2002
- Location
- Aylmer, QC, Canada
- Posts
- 409
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Dan Schulz
-
Oct 23, 2006, 12:12 #16
Originally Posted by Dan Schulz
There are some people still using IE5 but we can't fully support all of them. Take this situation for example, who cares that some people get mid scrolled div upon page refresh? That's really not a big issue, if you will.Saul
-
Oct 23, 2006, 12:42 #17
- Join Date
- May 2006
- Location
- Aurora, Illinois
- Posts
- 15,476
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
For IE 5x, it's best to determine whether you'll support that generation or not by checking the server stats (for an existing site), and to make the site work as well as reasonably possible for that archaic browser for a new site.
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
-
Oct 23, 2006, 13:15 #18
Yes. I just wanted to say that one should not worry about relatively small flaws on old browsers. Just like in this particular papaja's case.
Saul
-
Oct 23, 2006, 16:53 #19
- Join Date
- Oct 2006
- Location
- Seattle
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
papaja I agree 100%. With the new wave of browsers coming out. I noticed that when Flash 8 came out it was very hard to find users that had it loaded. Now it seems like almost everyone has Flash 9. Maybe its just my site. The oldest browsers I have seen are IE5.5 Poor souls. After IE 7.0 and Firefox 2.0 which give a good compelling reason to upgrade more browsers should be up to date.
Granted my 2 cents worth opn the topic what do i knowWeb Designer and Telecom Engineer
http://www.ecarttemplates.com
http://www.telexus.net
-
Oct 23, 2006, 23:49 #20
- Join Date
- Jan 2005
- Location
- Sipovo
- Posts
- 59
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by php_daemon
It seems that I'll stick to IFrame. How to scroll IFrame to bottom?
-
Oct 24, 2006, 02:27 #21
- Join Date
- Sep 2006
- Location
- Nottingham, UK
- Posts
- 3,133
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
People still using the older browsers though just won't be affected by IE7 / FF2 releases. They will continue to use these old browsers unfortunately.
-
Oct 24, 2006, 02:42 #22
- Join Date
- Mar 2006
- Posts
- 190
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i got it in a notepad file ill post it soon as i find
Failure: Failure is the dress rehearsal for success.
Statistics: The only science that enables different
experts using the same figures to draw different conclusions.
-
Oct 25, 2006, 03:22 #23
- Join Date
- Nov 2005
- Location
- The Netherlands
- Posts
- 808
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by papaja
I used the following:
when a user added a chat message, that new message received an id (something like "message54"). I then added a hash to window.location (something like "http://www.foo.com/bar.html#message54"). That way, the browser focuses directly on the message added last.
Hope this helps
-
Oct 26, 2006, 00:03 #24
- Join Date
- Jan 2005
- Location
- Sipovo
- Posts
- 59
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This sounds interestingly and looks like good direction.
Thanks
Bookmarks