473,396 Members | 1,935 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,396 software developers and data experts.

netscape link problem

I made an html-page with this line in it:

<A HREF="http://www.bla.com" onClick="javascript:window.close()"
target="moeder">link</A>

It works very well in Internet Explorer, but in Netscape 7 the url isn't
opened in the moeder window. How come and how can I fix it so it works in
Netscape too? Thanks in advance for any answers.

Mrco

Jul 20 '05 #1
4 2541
Marco wrote:
I made an html-page with this line in it:

<A HREF="http://www.bla.com" onClick="javascript:window.close()"
target="moeder">link</A>

It works very well in Internet Explorer, but in Netscape 7 the url isn't
opened in the moeder window. How come and how can I fix it so it works in
Netscape too? Thanks in advance for any answers.

Mrco


<a href="http://www.bla.com"
target="moeder"
onclick="window.open(this.href, this.target);window.close();return
false;">link</a>

Note that if the window you are trying to close wasn't opened by script,
Netscape will fail with an error in the JavaScript Console of: "Scripts may
not close windows that were not opened by script."

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #2

"Grant Wagner" <gw*****@agricoreunited.com> wrote in message
news:3F***************@agricoreunited.com...
Marco wrote:
I made an html-page with this line in it:

<A HREF="http://www.bla.com" onClick="javascript:window.close()"
target="moeder">link</A>

It works very well in Internet Explorer, but in Netscape 7 the url isn't
opened in the moeder window. How come and how can I fix it so it works in Netscape too? Thanks in advance for any answers.

Mrco
<a href="http://www.bla.com"
target="moeder"
onclick="window.open(this.href, this.target);window.close();return
false;">link</a>


Thanks for the reply, but moeder already exists and this opens a new window.
I want to open the url in the existing moeder window.
Note that if the window you are trying to close wasn't opened by script,
Netscape will fail with an error in the JavaScript Console of: "Scripts may not close windows that were not opened by script."


Yeah, I know. Unfortunately I am not the one who decides how the window is
opened. Different project. Can't have it all. :)

Regards,

Marco
Jul 20 '05 #3

"Grant Wagner" <gw*****@agricoreunited.com> wrote in message
news:3F***************@agricoreunited.com...
Marco wrote:
I made an html-page with this line in it:

<A HREF="http://www.bla.com" onClick="javascript:window.close()"
target="moeder">link</A>

It works very well in Internet Explorer, but in Netscape 7 the url isn't
opened in the moeder window. How come and how can I fix it so it works in Netscape too? Thanks in advance for any answers.

Mrco
<a href="http://www.bla.com"
target="moeder"
onclick="window.open(this.href, this.target);window.close();return
false;">link</a>


Thanks for the reply, but moeder already exists and this opens a new window.
I want to open the url in the existing moeder window.
Note that if the window you are trying to close wasn't opened by script,
Netscape will fail with an error in the JavaScript Console of: "Scripts may not close windows that were not opened by script."


Yeah, I know. Unfortunately I am not the one who decides how the window is
opened. Different project. Can't have it all. :)

Regards,

Marco
Jul 20 '05 #4
Marco wrote:
"Grant Wagner" <gw*****@agricoreunited.com> wrote in message
news:3F***************@agricoreunited.com...
Marco wrote:
I made an html-page with this line in it:

<A HREF="http://www.bla.com" onClick="javascript:window.close()"
target="moeder">link</A>

It works very well in Internet Explorer, but in Netscape 7 the url isn't
opened in the moeder window. How come and how can I fix it so it works in Netscape too? Thanks in advance for any answers.

Mrco


<a href="http://www.bla.com"
target="moeder"
onclick="window.open(this.href, this.target);window.close();return
false;">link</a>


Thanks for the reply, but moeder already exists and this opens a new window.
I want to open the url in the existing moeder window.
Note that if the window you are trying to close wasn't opened by script,
Netscape will fail with an error in the JavaScript Console of: "Scripts

may
not close windows that were not opened by script."


Yeah, I know. Unfortunately I am not the one who decides how the window is
opened. Different project. Can't have it all. :)

Regards,

Marco


When window.open() is called a second time with the same window name (second
parameter), it loads the content into the same window instance.

Ignoring the window.close() for a second, please try the following code:

<a href="http://www.bla.com"
target="moeder"
onclick="window.open(this.href, this.target);return false;">link 1</a>
<a href="http://www.yahoo.com"
target="moeder"
onclick="window.open(this.href, this.target);return false;">link 2</a>

Tested in IE6SP1, Netscape 4.78, Mozilla 1.5a and Opera 7.11. In all browsers,
no matter how many times I clicked the links in sequence or one after another, I
only ever had one new window opened. This is the way window.open() is supposed
to work.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #5

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

Similar topics

9
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to...
7
by: Scott | last post by:
Hello All, I've been reading all of the various issues with Iframes in netscape. I have tried all of the various fixes posted, and have even implemented both an iframe and ilayer. My problem is...
9
by: Dom | last post by:
I have a frameset with a left right columns, called 'index' and 'content'. The left column of the frameset ('index') loads an index.htm file which have these hrefs (summarized the code a bit)...
1
by: The Pistoleer | last post by:
I have an inconsistent problem with some Internet pages when using Netscape (7.1) that I cannot reproduce with IE nor locally. Below is an example link. There are several tables on the pages. ...
7
by: Jonas Smithson | last post by:
Hello all, I have an absolute positioned parent div, and nested inside it is an absolute positioned child div -- I mean the div *code* is nested inside, but the child is physically positioned so...
13
by: AMC | last post by:
Hi, I have the below code in an asp page. When I run this page in IE or Opera it correctly displays the header info and does not redirect me to 'test.html'. However, when I run this in Netscape...
5
by: Christina Joch | last post by:
My Website (Template) uses JavaScript to create a pop-up window in the gallery. With IE it works fine, but not with my Netscape 7.0. No Pop up apears. In the script I found the line: if...
1
by: sihnstarr | last post by:
I have a pop-up window that contains a chart with a list of links. When the link is clicked, it is supposed to close the pop-up window and navigate to the page selected from the pop-up in the...
4
by: Vik | last post by:
1. To show the sort order in a datagrid, a label is added to the datagrid header in the ItemCreated event (this method is taken from a book): With lblSorted ..Font.Name = "Webdings" ..Font.Size =...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
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
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...
0
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,...

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.