Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 35

Thread: DIV vs IFRAME

  1. #21
    Member screenweb's Avatar
    Join Date
    May 2003
    Location
    Surrey, UK
    Posts
    89
    Member #
    1452
    I've never used <DIV> like that before. I've used <IFRAME> in some places.

    I remember reading you can create image scrollbars with <DIV> aswell. How Exciting!

  2.  

  3. #22
    Junior Member perogrullo's Avatar
    Join Date
    Nov 2003
    Posts
    2
    Member #
    3901
    doubts, doubts...and more doubts

    Is wrong the uses of the iframe tag when you have to load html code inside the page (some kind of menu that loads a form included in other page...)?
    And, there is some problem with the W3C standard if i'm using the iframe tag?


    I sorry very much by my english, it's very bad and poor.

  4. #23
    Senior Member DeltaWeb's Avatar
    Join Date
    Oct 2003
    Location
    U.S. of A
    Posts
    159
    Member #
    3592
    haha, good idea but kind of shaky, lol.
    KRS-ONE....Knowledge Reigns Supreme Over Nearly Everyone....

  5. #24
    Junior Member perogrullo's Avatar
    Join Date
    Nov 2003
    Posts
    2
    Member #
    3901
    I don't know what's so shaky? Can you explain it, please?

    And, what's the meaning of 'lol'?

  6. #25
    Senior Member Jasoncw's Avatar
    Join Date
    Jan 2004
    Location
    Detroit, MI, United States
    Posts
    254
    Member #
    4401
    I don't think w3c has any problems with I-frames, but I haven't read most of that site.

    "lol" is an abbreviation for "laugh out loud". Ussualy it dosen't mean that the person is actualy laughing, it just means the person thought it was funny.
    Jason

  7. #26
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    W3C doesn't have PROBLEMS with iframes, per se. The W3C HTML DTD does not support them or suggest them, however. That puts iframes on the same level as the Netscape <column> element (which is a much better element if you ask me... only reason it didn't take off is cause damn IE never picked it up)

  8. #27
    Junior Member
    Join Date
    Feb 2005
    Posts
    1
    Member #
    8895
    hi,

    I want to create a page which consists of two or more than wo divs , but it must be created in such way that , we will get the ipmression of a frame. But the main problem is, in frame we can drag the partition bar up and down, which i am not able to do in Div.
    Can any one help me out in getting such div's so that the partition can be dragged up and down.

  9. #28
    Junior Member jshuru's Avatar
    Join Date
    Mar 2005
    Location
    Danvers, Massachussetts
    Posts
    3
    Member #
    9305
    as to the whole "keeping the page design the same" thing, well, I like using php for that!
    A combination of DIVs and PHP can make the web a better place!

  10. #29
    Member themayanlion's Avatar
    Join Date
    Mar 2005
    Posts
    40
    Member #
    9225
    i only use iframes if something on the page should not be refreshed (like a flash/html site).

    otherwise, i use a PHP include script with divs.
    it's taken from shiver7.com.

    that script is a template for a whole page, but i modified the middle part of it a little bit, to work with the functionality of an iframe. with that system, you'd need a seperate if statement for every page you would need to load.

    what i came up with looks like this:

    Code:
    <div>
    <?php
    	$content = $_GET['content'];
    	$extension = '.html';
    	if (($content == "home") or ($content =="")) {
    	include('mainpage.html');
    	} else if ( preg_match("#^[a-z0-9_/]+$#i",$content) ){
    	$filename = $content.$extension;
    	include ($filename);
    	}
    ?>
    </div>
    let's say you want to call a news page called news.html. your link then would be:
    Code:
    <a href="?content=news">News</a>
    it works like this.

    Code:
    $content = $_GET['content'];
    $extension = '.html';
    you declare a variable called $content. this is the path to the page on your site you are trying to link.

    the $extension variable shows what kind of file you will call. most sites i work with only use html, so that's why that is there. i'll get into it in a second.

    Code:
    if (($content == "home") or ($content =="")) {
    	include('mainpage.html');
    }
    this calls whatever page you want to be the default page by checking the current value of $content.

    Code:
    else if ( preg_match("#^[a-z0-9_/]+$#i",$content) ){
    	$filename = $content.$extension;
    	include ($filename);
    }
    let's say you clicked the "news" link provided above. it changes the value of $content so this part executes. it first checks the value of $content for illegal characters (legal being inside the square brackets), then declares a new variable called $filename which is assigned the value of $content and $extension, which you declared earlier.

    then of course, it includes it.
    it also works if you want to call pages above or below the directory you are currently in.
    Code:
    <a href="?content=../../news">
    <a href="?content=pages/content/news">
    as it is, this only works for html pages, but you can easily modify it by removing the extension variable from the script, and call the extension in the link:

    <a href="?content=news.php> for example.

    i'm sure thsi can be extended further to do multiple things. i'm just learning PHP, and it actually took a lot of research for me to be able to modify the shiver script to the way i wanted it.

    again, this works if you don't mind the page being refreshed.
    hope it helps!

    EDIT: oh and of course adding an overflow: auto; style to the div tag will create scroll bars if needed

  11. #30
    Member themayanlion's Avatar
    Join Date
    Mar 2005
    Posts
    40
    Member #
    9225
    also, since i didn't read the entire thread before i posted iframes won't invalidate any pages excwpt XHTML strict pages, i think, but the upcoming XHTML 2 phases them (and i think all frames) out in favor of something called an xframe. http://www.w3.org/TR/xframes/


Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Remove Ads

Posting Permissions

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

Search tags for this page

better than iframe
,
div iframe
,
div or iframe
,

div vs iframe

,
html div vs iframe
,
iframe versus div
,

iframe vs div

,
iframe vs div html
,
iframes vs div
,
when to use iframe vs div
Click on a term to search for related topics.
All times are GMT -6. The time now is 08:11 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com