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 4 of 4 FirstFirst ... 2 3 4
Results 31 to 35 of 35

Thread: DIV vs IFRAME

  1. #31
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Dynamic content in divs

    Quote Originally Posted by kamnet
    ...can you load new content to a DIV, like you can with IFRAME? If so, would anybody care to PM me with some examples, or post them here?
    It is possible to do it with JavaScript, but that makes it more tedious than using an iframe. It depends on what you're trying to do -- parts of GMail may or may not use divs, though I know they also use iframes (getting around the structure of that system, even with Firefox's DOM Inspector, is a pain).

    The JS involved in fetching database-created data and putting it into a div would most likely require some use of AJAX (Asnychronous JavaScript and XML, more on Wikipedia.

  2.  

  3. #32
    Junior Member
    Join Date
    Jun 2005
    Posts
    7
    Member #
    10191
    Themayanlion

    You are my savior..t.hanks for posting that code.

  4. #33
    Junior Member
    Join Date
    Jun 2005
    Posts
    7
    Member #
    10191
    My only question is this.

    I want to set my included pages as PHP file so I can parse variables that are set in the page that is calling them.

    Would the variables set in the "parent page" be passed onto to page being called into the div?

  5. #34
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    If you use PHP's include or require, then what it basically does is just keep running in that page and then return. All the variables and everything are available, provided they are in the global scope, as with any other part of the page.

    If you don't use PHP's include/require (i.e., if you use JS to call in a page or something), then you'll need to pass variables on the URI using GET.

  6. #35
    Member Nickhead's Avatar
    Join Date
    Jul 2003
    Location
    Pittsburgh, PA
    Posts
    81
    Member #
    2221
    iframe

    Here is a decent scenario when an IFRAME must be used.

    http://www.musicpitt.net/forum.html

    My server doesnt support ASP, so I have an ASP forum on someone elses server that does. The IFRAME holds the forum, and it puts the forum inside my design so it looks like it is part of the page.

    However, it doesn't work on Mac.

    If anyone has a better solution, let me know. I should probably just change servers.
    Nickhead
    musicpitt.net


Page 4 of 4 FirstFirst ... 2 3 4

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 10:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com