Question regarding iFrames

Discussion in 'Web Design and Development' started by VPrime, May 4, 2009.

  1. VPrime macrumors 68000

    VPrime

    Joined:
    Dec 19, 2008
    Location:
    London Ontario
    #1
    Hey, I have a site I developed for some one.. This site uses an iFrame for all of the content.
    So when they click a link on the page the frame loads the data.

    Now what I want to know is if its possible to link some one to the site but have the frame load up what I want.

    Eg.
    I have my index.html with an iFrame that goes to default.html. One of the links int he navigation go to contact.html

    Right now if I give some one the url to my site I give them www.example.com and it loads up the default.html.

    What if I want them to go to the site but have the frame load up contact.html

    Is it possible? Did any of this make sense?
    Thanks.
     
  2. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #2
    Took me a minute to wrap my brain around what you were asking, but I'm pretty sure you'll have to use server-side scripting so you can pass which frame content you want to the index page.

    Something like:
    www.example.com/index.php?content=contact.html

    Not pretty, but that's all I can think of.
    Anyone else?
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    n additional way from the above is to use JavaScript. As the user navigates the site you can update the URL with a hash on the end e.g., #page1. It's not a great solution, but that's part of the problem with making the site inside an iframe. I'd work on getting it out of that if possible.
     

Share This Page