473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Window Handles on Mac

I want one window to open another window which then changes the URL in the
first window, Here are the 2 files, works fine on a PC running XP and IE,
doesn't work on a iMac running OSX and IE, any ideas? On the mac the calling
window just gets replaced with a blank.

--------------------------main.htm------------------------------
<html>
<body>
<script>
window.name = "MPC";
NewWindow = window.open('HandleReplace.htm',"NewWindow",'');
</script>
</body>
</html>
------------------------------------------------------------------
--------------------------HandleReplace.htm--------------------
<html>
<body>
<script>
windowHandle=window.open('','MPC','');
windowHandle.location.replace("http://www.bbc.com");
</script>
</body>
-------------------------------------------------------------------

This is just a stripped down example that demonstrates the problem. Please
don't ask me why I don't just go straight to the BBC website!


Jul 23 '05 #1
1 1102
"Simon Wigzell" <si**********@shaw.ca> wrote in message news:<sPOQc.28741$M95.6184@pd7tw1no>...
I want one window to open another window which then changes the URL in the
first window, Here are the 2 files, works fine on a PC running XP and IE,
doesn't work on a iMac running OSX and IE, any ideas? On the mac the calling
window just gets replaced with a blank.

You may refere directly to global variables and DOM objects in child
windows. Just proceed the reference with opener. This should work in
all browsers. I tested this on IE 5.2 and Netscape 7.1 on MacOS
10.2.6.

Example & note the change in the extension:

main.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>First window</TITLE>

<SCRIPT type="text/javascript">

function openWin()
{
var newWindow = window.open('HandleReplace.html',"NewWindow",'');
}
</script>

<body onload='alert("Open second window & change url " +
"of this page.");
openWin();'>
<p>Possible solution for Window Handles on Mac.</P>
</body>
</html>

HandelReplace.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>second window</TITLE>
<body>
<script>
// You can refer to the DOM and global variables in the
// window that openned this page by preceding the
// variables with opener.
opener.location.replace("http://www.bbc.com");
</script>
<p>We have just changed the URL of the first window.</p>
</body>
Robert
Jul 23 '05 #2

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

Similar topics

1
by: benc | last post by:
Hi Can anyone enlighten why dispose() a form does not seems to release window handles. My .NET app crushes after while, typically when window handles > 1400 or so. My main form creates/inits about...
3
by: Steve Wark | last post by:
I have created a ASP.NET application and created two forms within the application (Webform1.aspx & Webform2.aspx). On the first form I have placed a textbox (TextBox1) and a button, which when...
1
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for...
3
by: Thom | last post by:
I am relativly new to vb.net ..... heck I'm new to VB in any version. So I apologize if this is overly dumb. I am trying to start and stop a particular file using the process.start() and...
0
by: Steve | last post by:
Some end users are getting the following message after being in the application for quite some time. Exception Type: System.ComponentModel.Win32Exception NativeErrorCode: 14 ErrorCode:...
4
by: drodrig | last post by:
Hi. I am trying to close/kill all processes that show visible windows on Windows XP. So far I've created a script that uses win32gui.EnumWindows to iterate through all windows, check for which...
0
by: homsar | last post by:
I've seen many posts discussing the options we have when using modal windows within a web based application. Often times it seems the greatest hurdle is simply getting the modal window to post back...
10
by: Stephany Young | last post by:
When one uses the System.Diagnostics.Process.Start method to launch a common or garden Console application, one can set the WindowStyle property of the StartInfo object to ProcessWindowStyle.Hidden...
2
by: Jonathan Boivin | last post by:
Hi people, Let me introduce to how I get this error. I have a form which load all my bills representation depending upon filters which each bill is a usercontrol of my own having some...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.