how to show content in another iFrame

Discussion in 'ASP .Net Web Controls' started by haiwen, Sep 18, 2003.

  1. haiwen

    haiwen Guest

    Hello, everyone,

    I have a page includes two iFrame, could anyone tell me
    how to use links or imageButton to change other iFrame's
    content?

    Thanks a lot,

    haiwen
     
    haiwen, Sep 18, 2003
    #1
    1. Advertising

  2. haiwen

    haiwen Guest

    Hello, everyone,

    I can use imageButton to change other iFrame's content,
    that is <input type=button
    onclick="parent.document.getElementById
    ('iFrame2').src='other.aspx';" ...

    but I prefer to use links that in the same page and in the
    page of iFrame1. unfortunately, I always fail in the
    target setting that the links always open a new window.

    could anyone help?

    Thanks a lot,

    haiwen

    >-----Original Message-----
    >Hello, everyone,
    >
    >I have a page includes two iFrame, could anyone tell me
    >how to use links or imageButton to change other iFrame's
    >content?
    >
    >Thanks a lot,
    >
    >haiwen
    >
    >.
    >
     
    haiwen, Sep 18, 2003
    #2
    1. Advertising

  3. Hi Haiwen,

    I have reviewed your issue. Due to the nature of your issue I need to do
    additional research to determine the best way to provide assistance. I will
    contact you as soon as possible.

    Best regards,

    Jacob Yang
    Microsoft Online Partner Support
    <MCSD>
    Get Secure! ¨C www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
     
    Jacob Yang [MSFT], Sep 19, 2003
    #3
  4. Hi Haiwen,

    I am sorry if there is any misunderstanding but I cannot reproduce the
    problem of "open a new window" on my side.

    The followings are my testing pages. Please test it on your side
    --------WebForm1.aspx-----------
    <%@ Page Language="vb"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>WebForm1</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema
    content="http://schemas.microsoft.com/intellisense/ie5">
    </head>
    <body MS_POSITIONING="GridLayout">

    <form id="Form1" method="post" runat="server">
    <iframe id="iframe1" src="webform2.aspx"></iframe>
    <iframe id="iframe2" src="webform3.aspx"></iframe>
    </form>

    </body>
    </html>
    -------------------------------------------

    ----------WebForm2.aspx--------
    <%@ Page Language="vb"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>WebForm2</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema
    content="http://schemas.microsoft.com/intellisense/ie5">
    </head>
    <body MS_POSITIONING="GridLayout">

    <form id="Form1" method="post" runat="server">
    <P>This is test page 1.</P>

    <a href = "webform2.aspx" onclick="parent.document.getElementById
    ('iFrame2').src='webform4.aspx'">test page 3</a>
    <P>&nbsp;</P>
    <P>&nbsp;</P>
    </form>

    </body>
    </html>
    -----------------------------------------

    ---------WebForm3.aspx--------
    <%@ Page Language="vb"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>WebForm3</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema
    content="http://schemas.microsoft.com/intellisense/ie5">
    </head>
    <body MS_POSITIONING="GridLayout">

    <form id="Form1" method="post" runat="server">
    <P>This is test page2.</P>
    </form>

    </body>
    </html>
    --------------------------------------------

    ---------WebForm4.aspx---------
    <%@ Page Language="vb"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>WebForm4</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema
    content="http://schemas.microsoft.com/intellisense/ie5">
    </head>
    <body MS_POSITIONING="GridLayout">

    <form id="Form1" method="post" runat="server">
    <P>This is test page 3.</P>
    </form>

    </body>
    </html>
    ----------------------------------------

    If I have misunderstood your concern, please feel free to let me know.

    Best regards,

    Jacob Yang
    Microsoft Online Partner Support
    <MCSD>
    Get Secure! ¨C www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
     
    Jacob Yang [MSFT], Sep 20, 2003
    #4
  5. haiwen

    haiwen Guest

    Hello, Jacob Yang:

    Thank you so much, I made a mistake to try to set up the
    target attribute of <a .., use the onclick event just like
    the button then it works very well as you show.

    I do appreciate your help,

    Best Wishes,

    Haiwen Fu
    >-----Original Message-----
    >Hi Haiwen,
    >
    >I am sorry if there is any misunderstanding but I cannot

    reproduce the
    >problem of "open a new window" on my side.
    >
    >The followings are my testing pages. Please test it on

    your side
    >--------WebForm1.aspx-----------
    ><%@ Page Language="vb"%>
    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0

    Transitional//EN">
    ><html>
    > <head>
    > <title>WebForm1</title>
    > <meta name="GENERATOR" content="Microsoft Visual

    Studio .NET 7.1">
    > <meta name="CODE_LANGUAGE" content="Visual Basic .NET

    7.1">
    > <meta name=vs_defaultClientScript

    content="JavaScript">
    > <meta name=vs_targetSchema
    >content="http://schemas.microsoft.com/intellisense/ie5">
    > </head>
    > <body MS_POSITIONING="GridLayout">
    >
    > <form id="Form1" method="post" runat="server">
    > <iframe id="iframe1"

    src="webform2.aspx"></iframe>
    > <iframe id="iframe2"

    src="webform3.aspx"></iframe>
    > </form>
    >
    > </body>
    ></html>
    >-------------------------------------------
    >
    >----------WebForm2.aspx--------
    ><%@ Page Language="vb"%>
    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0

    Transitional//EN">
    ><html>
    > <head>
    > <title>WebForm2</title>
    > <meta name="GENERATOR" content="Microsoft Visual

    Studio .NET 7.1">
    > <meta name="CODE_LANGUAGE" content="Visual Basic .NET

    7.1">
    > <meta name=vs_defaultClientScript

    content="JavaScript">
    > <meta name=vs_targetSchema
    >content="http://schemas.microsoft.com/intellisense/ie5">
    > </head>
    > <body MS_POSITIONING="GridLayout">
    >
    > <form id="Form1" method="post" runat="server">
    > <P>This is test page 1.</P>
    >
    > <a href = "webform2.aspx"

    onclick="parent.document.getElementById
    >('iFrame2').src='webform4.aspx'">test page 3</a>
    > <P> </P>
    > <P> </P>
    > </form>
    >
    > </body>
    ></html>
    >-----------------------------------------
    >
    >---------WebForm3.aspx--------
    ><%@ Page Language="vb"%>
    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0

    Transitional//EN">
    ><html>
    > <head>
    > <title>WebForm3</title>
    > <meta name="GENERATOR" content="Microsoft Visual

    Studio .NET 7.1">
    > <meta name="CODE_LANGUAGE" content="Visual Basic .NET

    7.1">
    > <meta name=vs_defaultClientScript

    content="JavaScript">
    > <meta name=vs_targetSchema
    >content="http://schemas.microsoft.com/intellisense/ie5">
    > </head>
    > <body MS_POSITIONING="GridLayout">
    >
    > <form id="Form1" method="post" runat="server">
    > <P>This is test page2.</P>
    > </form>
    >
    > </body>
    ></html>
    >--------------------------------------------
    >
    >---------WebForm4.aspx---------
    ><%@ Page Language="vb"%>
    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0

    Transitional//EN">
    ><html>
    > <head>
    > <title>WebForm4</title>
    > <meta name="GENERATOR" content="Microsoft Visual

    Studio .NET 7.1">
    > <meta name="CODE_LANGUAGE" content="Visual Basic .NET

    7.1">
    > <meta name=vs_defaultClientScript

    content="JavaScript">
    > <meta name=vs_targetSchema
    >content="http://schemas.microsoft.com/intellisense/ie5">
    > </head>
    > <body MS_POSITIONING="GridLayout">
    >
    > <form id="Form1" method="post" runat="server">
    > <P>This is test page 3.</P>
    > </form>
    >
    > </body>
    ></html>
    >----------------------------------------
    >
    >If I have misunderstood your concern, please feel free to

    let me know.
    >
    >Best regards,
    >
    >Jacob Yang
    >Microsoft Online Partner Support
    ><MCSD>
    >Get Secure! ¨C www.microsoft.com/security
    >This posting is provided "as is" with no warranties and

    confers no rights.
    >
    >.
    >
     
    haiwen, Sep 23, 2003
    #5
    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. Daedalous
    Replies:
    3
    Views:
    822
    Daedalous
    Jan 16, 2004
  2. James Wallace
    Replies:
    1
    Views:
    113
    William Morris
    May 14, 2004
  3. Laura
    Replies:
    0
    Views:
    214
    Laura
    Jun 23, 2004
  4. nc
    Replies:
    0
    Views:
    179
  5. libsfan01
    Replies:
    1
    Views:
    182
    Randy Webb
    Sep 14, 2006
Loading...

Share This Page