Associating Iframe pages with a specific page. Server side

Discussion in 'ASP General' started by paul dallaire, Jul 4, 2005.

  1. HI! I need to associate a iframe pages to a specific page for my menu
    system.

    I want to be able to click on my menu system anywhere on my site and the
    options that is clicked will load that options ( iframe page ) into a
    specific page that holds the iframe.

    Right now the options are only available when on the page that holds the
    Iframe in question ( templates.htm )but if you are on another page (
    index.htm) how do we tell it to load that option into ( templates.htm ) ?

    I think I need some kind of ASP script that would associate any Iframe page
    that I specify to the ( Templates.htm ) page.

    How do we do this? does anyone have any ideas/examples ?

    Paul
    paul dallaire, Jul 4, 2005
    #1
    1. Advertising

  2. paul dallaire

    Giles Guest

    "paul dallaire" <> wrote
    > HI! I need to associate a iframe pages to a specific page for my menu
    > system.
    > I want to be able to click on my menu system anywhere on my site and the
    > options that is clicked will load that options ( iframe page ) into a
    > specific page that holds the iframe.
    > Paul


    Total air code, but may give you some ideas...

    Menu -
    <a href="mainpage.asp?ifp=subpage.asp">Click</a>

    mainpage.asp -
    <%
    ifpsrccode="document.getElementbyid.if1.src='" & request("ifp") & "'"
    %>
    <html>
    ....
    <body onload="<%=ifpsrccode%>">
    <iframe id=if1 name=if1></iframe>
    ....
    </html>

    However, there must be easier (and non-clientside) ways! Try looking at
    server.execute, or XMLHTTP etc
    IME "clever coding" is a nightmare for someone else to pick up if they have
    to work with your coding in future. Often better just to write the extra
    pages as stand-alones unless it is more than 100 or so...
    Giles
    Giles, Jul 4, 2005
    #2
    1. Advertising

  3. paul dallaire

    Paul Guest

    Cool. Thanks, that's what I was looking for. I will see about server
    side.

    Thanks again. :)

    Paul



    *** Sent via Developersdex http://www.developersdex.com ***
    Paul, Jul 4, 2005
    #3
  4. paul dallaire wrote:
    > I want to be able to click on my menu system anywhere on my site and
    > the options that is clicked will load that options ( iframe page )
    > into a specific page that holds the iframe.


    What's wrong with target="_top" ?
    http://www.w3.org/TR/html401/types.html#type-frame-target



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
    Dave Anderson, Jul 5, 2005
    #4
  5. paul dallaire

    Paul Guest

    HI! _top will not work because its not always on the page which holds
    the Iframe.

    The menu is on all pages and the user could be on index.htm and the page
    which holds the iframe is called premium.htm.

    So if the user clicks the menu when on index.htm we have to put the
    iframe_page into the premium.htm and display it.

    Paul



    *** Sent via Developersdex http://www.developersdex.com ***
    Paul, Jul 5, 2005
    #5
  6. NOTE: I will not respond further if you don't quote the text you are
    replying to.

    Paul wrote:
    > HI! _top will not work because its not always on the page which
    > holds the Iframe.


    _top will always target the outermost window, so its behavior will be
    identical no matter where it is clicked. That said, ...



    > The menu is on all pages and the user could be on index.htm and
    > the page which holds the iframe is called premium.htm.


    Please stop confusing pages with frames. You don't target pages.

    target = frame-target [CI]
    This attribute specifies the name of a frame where a document
    is to be opened.
    (http://www.w3.org/TR/html401/present/frames.html#adef-target)



    > So if the user clicks the menu when on index.htm we have to put
    > the iframe_page into the premium.htm and display it.


    This is a solved problem. Consider this URL:
    http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp

    The links in the tree at left target the right. What do you suppose the link
    to [Properties] looks like? I'll share:

    <a
    href="/library/default.asp?url=/workshop/author/dhtml/reference/properties.asp"
    title="Properties" target="_top">Properties</a>

    See how that works? It still changes the content of the content frame, even
    though it targets _top. That is one way to get consistent behavior.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
    Dave Anderson, Jul 7, 2005
    #6
  7. paul dallaire

    Paul Guest

    HI! sorry about the quote problem. I never has too before. I always just
    response to the actuall users post in question. I am not sure how to quote
    as I have never done so.

    Has for _top well I can use it if I am on the page ( eg. page_frame.htm )
    that holds the Iframe ( Iframe001). I can load any given page into the
    Iframe while on page_frame.htm.

    Now what if I am on index.asp and I have a menu with sub options. I want
    those sub options (eg, 1.htm, 2.htm, 3.htm..ect..) to load into Iframe001.
    How do we do that?

    Paul.


    "Dave Anderson" <> wrote in message
    news:...
    > NOTE: I will not respond further if you don't quote the text you are
    > replying to.
    >
    > Paul wrote:
    >> HI! _top will not work because its not always on the page which
    >> holds the Iframe.

    >
    > _top will always target the outermost window, so its behavior will be
    > identical no matter where it is clicked. That said, ...
    >
    >
    >
    >> The menu is on all pages and the user could be on index.htm and
    >> the page which holds the iframe is called premium.htm.

    >
    > Please stop confusing pages with frames. You don't target pages.
    >
    > target = frame-target [CI]
    > This attribute specifies the name of a frame where a document
    > is to be opened.
    > (http://www.w3.org/TR/html401/present/frames.html#adef-target)
    >
    >
    >
    >> So if the user clicks the menu when on index.htm we have to put
    >> the iframe_page into the premium.htm and display it.

    >
    > This is a solved problem. Consider this URL:
    > http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp
    >
    > The links in the tree at left target the right. What do you suppose the
    > link to [Properties] looks like? I'll share:
    >
    > <a
    > href="/library/default.asp?url=/workshop/author/dhtml/reference/properties.asp"
    > title="Properties" target="_top">Properties</a>
    >
    > See how that works? It still changes the content of the content frame,
    > even though it targets _top. That is one way to get consistent behavior.
    >
    >
    >
    > --
    > Dave Anderson
    >
    > Unsolicited commercial email will be read at a cost of $500 per message.
    > Use of this email address implies consent to these terms. Please do not
    > contact me directly or ask me to contact you directly for assistance. If
    > your question is worth asking, it's worth posting.
    >
    Paul, Jul 22, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Tm92aWNl?=
    Replies:
    1
    Views:
    459
    John Saunders
    Sep 23, 2004
  2. =?Utf-8?B?TUxpYmJ5?=

    Redirect an IFrame's Parent Page: Server-Side Code

    =?Utf-8?B?TUxpYmJ5?=, Mar 16, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    12,578
    Sheryl Landon
    Apr 28, 2005
  3. IRAS Blues

    Server-side IFRAME page loader

    IRAS Blues, Jul 14, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    228
    IRAS Blues
    Jul 14, 2004
  4. Daedalous
    Replies:
    3
    Views:
    663
    Daedalous
    Jan 16, 2004
  5. Paul
    Replies:
    3
    Views:
    131
Loading...

Share This Page