1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Is there a HTML/JavaScript code that mimics the function of 'frames'?

Discussion in 'HTML & Website Design' started by sportiana, Aug 27, 2007.

  1. #1
    The best I have come up with is a code like <img src="http://www.sportiana.com/images/Arsenal.jpg" border=0 alt="sport"> for putting in pictures but I don't know how to bring into the web-page another .html page like 'frames' do!

    I'd like to put a page like http://sportiana.com/football/holland/1/titles/groningen.html that contains title of a football team into the web-page http://www.sportiana.com/football/holland/1/ajax.html like I did it with the use of frames.

    I have 5-6 frames in web-pages, problem with frames is that they come as a last element while the page is loading and there's a white box until they are displayed, my site is all in red color, big white boxes that appear across the page do not look appealing, white boxes do not appear using <img src>, I was hoping the same will be with a code that mimics 'frames'.
     
    sportiana, Aug 27, 2007 IP
  2. hfweb

    hfweb Peon

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could use javascript to do it, however if the user did not have javascript enabled or was using an older web browser, it would possibly not show up at all for them.

    The only way I know of doing it would be to exacute a javascript doing some XMLHttpRequest's on pageload and then change the inner html of a div to what ever the XMLHttpRequest returns.
     
    hfweb, Aug 27, 2007 IP
  3. quite

    quite Peon

    Messages:
    392
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    quite, Aug 27, 2007 IP
  4. NineDesign

    NineDesign Peon

    Messages:
    237
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just use PHP includes for the area's you want to pull into your page.
     
    NineDesign, Aug 27, 2007 IP
  5. danielbruzual

    danielbruzual Active Member

    Messages:
    906
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    70
    #5
    What you are looking for is called IFRAME. It is an HTML tag that allows you to include HTML files in another HTML file.

    How to use IFRAMES
     
    danielbruzual, Aug 27, 2007 IP
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The OBJECT element can do this too. I'm not at home right now, but I have a bookmark on my browser (Opera) that links to a page detailing how someone managed to make OBJECT work cross-browser when importing HTML files.
     
    Dan Schulz, Aug 27, 2007 IP
  7. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Oooh, do post it, Dan.
     
    Stomme poes, Aug 28, 2007 IP
  8. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
  9. sarah84

    sarah84 Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i think about iframe too
     
    sarah84, Aug 28, 2007 IP