Results 1 to 9 of 9

Thread: control what goes into iframe from a page without iframe

  1. #1
    Join Date
    Mar 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow control what goes into iframe from a page without iframe

    Hi, I have two pages, one with iframe, one without. I dont know how to control what goes into the iframe from the page without. If anyone can help me it will be very very helpful
    Thanks

  2. #2
    Join Date
    Nov 2004
    Location
    Here to often...
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    Do you mean you have an iframe (page a) within a page (page b) and from page b you want content to load from page a via links from page b??? (are ya keeping up??!)

    If this is the case you would link as normal but target the content to load in the iframe e.g.

    <a href="pagea.htm" target="iframe">Link</a>


    Regards

    Donna

  3. #3
    Join Date
    Mar 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, sorry i didnt make it clear enough
    say theres 3 pages, a, b and c
    page 'c' lies within the iframe of page 'b'
    i was wondering if i would be able to control what goes into the iframe of page 'b' from a separate page 'a', without page 'a' being on the same page as page 'b' or 'c' (page a acting like a splash page)
    hope thats a bit clearer

  4. #4
    Join Date
    Mar 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I've added a picture to try and make it a bit clearer

  5. #5
    Join Date
    Nov 2004
    Location
    Here to often...
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    I am pressuming that you want to have Page b loading after page a.

    Just make a link as normal to page b and then specify what you want to be loaded in your Iframe

    So on page a you would have
    <a href="pageb.htm">link</a>

    and then on page b for instance

    <div id="floatframe">
    <iframe width=350 height=300 src="pagec.htm" align=right frameborder=0 hspace=10
    vspace=10 scrolling=auto name=Iframe></iframe>
    </div>

    the src="Your content here" is where you would specify what page you want to load.

    Am I on the right track here?

    Regards
    Donna

  6. #6
    Join Date
    Mar 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi donna,
    kinda but not quite,
    i want to be able to change what i'm able to load into the frame from page a
    say i want to try and load a page d,e or f all from page a based on dfft links
    instead of having a fixed page c all the time
    is there neway of doing that?

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default Load into frame or iframe

    The way to do it is give your iframe, it is on page b, a name:

    <iframe name="fred" src="pagec.htm" the rest of your iframe's attributes go here></iframe>

    Then on page a your links look like this:

    HTML Code:
    <a href="paged.htm" target="fred">Display Text or Image for Link</a>
    Works the same with frames. If page b is not open though, the link from page a will open a new window to display the new page. So, in the body tag of page a, you might want to put:

    <body onload="window.open('pageb.htm');">

  8. #8
    Join Date
    Nov 2004
    Location
    Here to often...
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    Sorry for the delayed reply.

    The only way I can think is to control it from different links on page a although it would mean building a lot of different pages so when it linked from a to b, c would be different. Would it not be easier to let the user control what they want to see from links on page b? It sounds like you are making a lot of work for yourself...

    Regards

    Donna

  9. #9
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by astralrose
    The only way I can think is to control it from different links on page a although it would mean building a lot of different pages so when it linked from a to b, c would be different.
    That would be the only reliable way if no server-side processing is available. However, is a language such as PHP or JSP is available, it's relatively simple to generate a page that changes the frame content based on a value in the query string.

    If this is not for the Web in general, you could also get away with analysing the query string using a client-side script and having that create the frame with unique sources.

    Mike

Bookmarks

Posting Permissions

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