473,545 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE is not redirecting the output to the correct frame

Hi,

I am trying to do the following

1. On form submit, open a window with three frames
2. Set the target as one of the frames
3. Set the action for the frame

It is working properly in version 6.0.2800.1106.x psp2, etc. But, the
same page is not working properly in version 6.0.2800.1006CO . IE
opens two windows, one window containing the Frames and another window
which contains the output of test1.html.

I have attached the two files:

test.html
=========

<html>
<head>
<script language='javas cript'>
function doit(form)
{
var tmpStr = "<HTML> <HEAD><TITLE>iV iew Record
Detail</TITLE></HEAD>" +
"<FRAMESET ROWS='30,100,30 '> " +
"<FRAME ID='detailDispl ayHeader' SRC='' MARGINHEIGHT=0
MARGINWIDTH=0 NORESIZE>"+
" <FRAME ID='detailDispl ayBody' NAME='bodyname'
MARGINHEIGHT=0 MARGINWIDTH=0>" +
" <FRAME ID='detailDispl ayFooter' SRC='' MARGINHEIGHT=0
MARGINWIDTH=0 NORESIZE>" +
" </FRAMESET>" +
"</HTML> ";

var mywindow=window .open('','mynam e'
,'toolbar=0,loc ation=0,directo ries=0,status=1 ,menubar=0,widt h=500,height=60 0,scrollbars=1, resizable=1,lef t=100,Top=100') ;
mywindow.docume nt.write(tmpStr );
mywindow.docume nt.close();

form.target='bo dyname';
form.action='te st1.html';
mywindow.focus( );

form.submit();
}
</script>
</head>
<body>Hello!! !
<form name="myform" onsubmit='doit( this); return false;'>
<input name='S' type='submit' value='button' />
</form>

</body>
</html>

2. test1.html
=============
<HTML>
<body>
HELLO
</body>
</HTML>

Any help in resolving this issue is greatly appreciated.
Magesh.
Jul 23 '05 #1
2 1727
Magesh wrote:
Hi,

I am trying to do the following

1. On form submit, open a window with three frames
2. Set the target as one of the frames
3. Set the action for the frame

It is working properly in version 6.0.2800.1106.x psp2, etc. But, the
same page is not working properly in version 6.0.2800.1006CO . IE
opens two windows, one window containing the Frames and another window
which contains the output of test1.html.

I have attached the two files:

test.html
=========

<html>
<head>
<script language='javas cript'>
<script type="text/javascript">
function doit(form)
{
var tmpStr = "<HTML> <HEAD><TITLE>iV iew Record
Detail</TITLE></HEAD>" +
"<FRAMESET ROWS='30,100,30 '> " +
"<FRAME ID='detailDispl ayHeader' SRC='' MARGINHEIGHT=0
MARGINWIDTH=0 NORESIZE>"+
" <FRAME ID='detailDispl ayBody' NAME='bodyname'
MARGINHEIGHT=0 MARGINWIDTH=0>" +
" <FRAME ID='detailDispl ayFooter' SRC='' MARGINHEIGHT=0
MARGINWIDTH=0 NORESIZE>" +
" </FRAMESET>" +
"</HTML> ";

var mywindow=window .open('','mynam e'
,'toolbar=0,loc ation=0,directo ries=0,status=1 ,menubar=0,widt h=500,height=60 0,scrollbars=1, resizable=1,lef t=100,Top=100') ;
mywindow.docume nt.write(tmpStr );


You are attempting to write to the document of a newly opened window milliseconds after you've asked the browser to open it.
There is no guarantee that the new window will contain a document available for writing to. You'd be much better off with:

<script type="text/javascript">
var output = "Your HTML...";
function doit(f) {
var mywindow = window.open('ja vascript:window .opener.output' , 'myname', '...');
return true;
}
</script>

And since the whole function is being set by the onsubmit event of the form, why not define your target and action in the
<form> tag:

<form target="bodynam e" action="test1.h tml" onsubmit="retur n doit(this);">

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq

Jul 23 '05 #2
We had the same problem. There is a bug introduced if you forget to
apply Q832894 to IE. The symptoms of the problem are that if you try
to reuse an already open window or frame that has a name assigned to
it, IE will ignore it and open a new window if you target it or use
window.open( url, name ). Read the support document for security
update 867801, which states that it is for everything AFTER 832894.
Sorry for not giving a longer explanation, but I replied to Magesh and
thought it would post a follow up here too.

This combination works:
IE 6.0.2800.1106CO SP1; Q832894; Q871260; Q833989

Cheers.

Magesh wrote:
Hi,

I am trying to do the following

1. On form submit, open a window with three frames
2. Set the target as one of the frames
3. Set the action for the frame

It is working properly in version 6.0.2800.1106.x psp2, etc. But, the
same page is not working properly in version 6.0.2800.1006CO . IE
opens two windows, one window containing the Frames and another window which contains the output of test1.html.

I have attached the two files:

test.html
=========

<html>
<head>
<script language='javas cript'>
function doit(form)
{
var tmpStr = "<HTML> <HEAD><TITLE>iV iew Record
Detail</TITLE></HEAD>" +
"<FRAMESET ROWS='30,100,30 '> " +
"<FRAME ID='detailDispl ayHeader' SRC='' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE>"+
" <FRAME ID='detailDispl ayBody' NAME='bodyname'
MARGINHEIGHT=0 MARGINWIDTH=0>" +
" <FRAME ID='detailDispl ayFooter' SRC='' MARGINHEIGHT=0 MARGINWIDTH=0 NORESIZE>" +
" </FRAMESET>" +
"</HTML> ";

var mywindow=window .open('','mynam e'
,'toolbar=0,loc ation=0,directo ries=0,status=1 ,menubar=0,widt h=500,height=60 0,scrollbars=1, resizable=1,lef t=100,Top=100') ; mywindow.docume nt.write(tmpStr );
mywindow.docume nt.close();

form.target='bo dyname';
form.action='te st1.html';
mywindow.focus( );

form.submit();
}
</script>
</head>
<body>Hello!! !
<form name="myform" onsubmit='doit( this); return false;'>
<input name='S' type='submit' value='button' />
</form>

</body>
</html>

2. test1.html
=============
<HTML>
<body>
HELLO
</body>
</HTML>

Any help in resolving this issue is greatly appreciated.
Magesh.


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1740
by: Didier Degey | last post by:
hi all here is my problem ... i'm working on a network connection project and for the application i use a multi-window system one page for the search form one page for displaying general informations one page for displaying details informations in one case, i can't determine where the result of the research must be displayed
3
1651
by: Dynamo | last post by:
Hi My site uses frames and some of the frame pages are ranked higher in search engine rankings than the main page. When somebody clicks on the link it takes them to the frame page and they don't see my page as it should be viewed plus it displays a javascript error. I need a way using php so that when the link is clicked on in either...
3
3742
by: David Douard | last post by:
Hi everybody, let me explain by problem: I am working on an application which consists in a C++ dll (numeric computations) and a Python IHM (Python/Tk), which must run under Linux and win32. My problem is the C++ lib does write stuffs on its stdout, and I would like to print those messages in a Tk frame. When I run the computation, it has...
0
2568
by: Christophe HELFER | last post by:
hi, I have some problem with redirecting input and output from a process. I can only use VB language (sorry...) Situation: I have to use the Cisco Network Registrar (DNS And DHCP server) command line utility as redirecting its input and output so I can interact with this one. This utility is similar to ftp under a win32 console. It...
3
2316
by: lozd | last post by:
Would appreciate any solutions people could offer for this. Basically I wan't to use a frameset with an aspx page as the contents rather than a htm page and I'd like to be able to redirect the main page from the code behind the contents page. I want to do this to allow the use of asp "linkbuttons" instead of hyperlinks so I can do a...
1
1851
by: Bilbo | last post by:
Hello, How do I programatically redirect a page in "another frame" using C# in ASP.NET? Server.Transfer redirects the current page...not a different frame. Thanks.
5
2217
by: Etienne Charland | last post by:
Hi, I have a simple problem that doesn't seem to have an easy solution. I have a popup used in many places in the application. At the top of the page, there is a link to switch between two views of the data. And in both views, I need a reference to the opener window. The problem is... once I change view, window.opener loose it's reference. How...
6
4160
by: Christophe Helfer | last post by:
hi, I have some problem with redirecting input and output from a process. Situation: I have to use the Cisco Network Registrar (DNS And DHCP server) command line utility as redirecting its input and output so I can interact with this one. This utility is similar to ftp under a win32 console. It proposes its own prompt after launching it....
0
7470
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7405
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7811
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7760
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5975
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5334
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3455
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
709
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.