how to show content in another iFrame

H

haiwen

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
 
H

haiwen

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
 
J

Jacob Yang [MSFT]

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.
 
J

Jacob Yang [MSFT]

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.
 
H

haiwen

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"> said:
<iframe id="iframe2"
src="webform3.aspx"> said:
</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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top