473,398 Members | 2,165 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,398 software developers and data experts.

window.opener.location.href does not work on Mac.

I am trying to redirect the parent page when the user clicks an html
button in an aspx page by using the javascript:
window.opener.location.href="EditOrders.aspx"; This works fine on IE
for windows or Firefox, however on IE for Mac or Safari on Mac, it
doesn't work. If I enable script errors on IE for Mac, I get:
'window.opener.location' is not an object. Any ideas on how to get this
to work on Mac browsers? Thanks!

Nov 23 '05 #1
3 10652
VK

alison wrote:
I am trying to redirect the parent page when the user clicks an html
button in an aspx page by using the javascript:
window.opener.location.href="EditOrders.aspx"; This works fine on IE
for windows or Firefox, however on IE for Mac or Safari on Mac, it
doesn't work. If I enable script errors on IE for Mac, I get:
'window.opener.location' is not an object. Any ideas on how to get this
to work on Mac browsers?


Try instead window.opener.document.location.href="EditOrders.a spx";
(this is not better and you variant is more correct, but just to sort
out all options).

Nov 23 '05 #2
Thanks, but that still doesn't work. If I enable IE on Mac to display
script errors, it displays: "'window.opener.document' is not an object".

*** Sent via Developersdex http://www.developersdex.com ***
Nov 23 '05 #3
alison wrote:
I am trying to redirect the parent page when the user clicks an html
button in an aspx page by using the javascript:
Hopefully you are not using the `javascript:' label here as that would
be either useless or error-prone.
window.opener.location.href="EditOrders.aspx"; This works fine on IE
for windows or Firefox, however on IE for Mac or Safari on Mac, it
doesn't work. If I enable script errors on IE for Mac, I get:
'window.opener.location' is not an object. Any ideas on how to get this
to work on Mac browsers? Thanks!


Try alert(window) and alert(window.opener) to see if both refer to an
object. If either does not, it would be prudent if you posted how you
opened the new window. If it does, try alert(window.opener.location).
If that returns the URL of the document displayed in the opening window,
try

if (window.opener && !window.opener.closed)
{
window.opener.location = "EditOrders.aspx";
}

instead.
HTH

PointedEars
Nov 23 '05 #4

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

Similar topics

5
by: Carol Lyn | last post by:
Could use your assistance with this. I have a window that opens via onclick and it is a small window with info about a site. If the user is interested in visiting that site, there is a link to...
3
by: Farooq Karim | last post by:
Greetings; I am unable to solve this problem; I hope someone will come up to show his brilliance. From my web page I open another link in another browser window. That new window is composed...
3
by: sentinel | last post by:
Hi all, I'm trying to reload a frame from a pop-up, but really cannot figure this out. Within my index.htm file, I make a link to call a pop-up frame with a javascript function that calls the...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
5
by: Hemanth | last post by:
Hello there, I'm running a script that opens a popup window (which is basically a form with checkboxes and a submit button). When I click the submit button I want to run a PHP script and target...
4
by: Kenneth | last post by:
Hi, I have two forms, parentForm and childForm. parentForm has a button(btn1) and a grid. childForm has a couple of textboxes and a button. The button on parentForm opens a new window of...
5
by: soni2926 | last post by:
Hi, I have a pop up window, that window needs to refresh the parent window when opened, I'm doing the following: window.opener.location.href(window.opener.location.href); problem I'm having...
1
by: Vexander | last post by:
Hi I am trying to right a script that closes a popup and then refreshes the pener to specific URL If have this that works form me <script type="text/javascript"> ...
3
by: Asterix | last post by:
Hi Guys, I know this is probably an easy one, but I am having issues. Basically, I have a pop-up (child) that controls the parent window. Clicking on a link on the child window should redirect...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
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.