Edwin said:
Hi,
I've just installed Netscape 7.1 for Linux and the following script
refuses to open a window when I call this function:
function OpenLinkWindow() {
wMap=window.open('
http://naxos.orangeport.net/cyclades-info/ShowMap.php?id_advert=45&map=','','width=400,height=600');
One of the top most frequent validation errors is to forget to escape
ampersands in url strings.
B.2.2 Ampersands in URI attribute values
http://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2
Common Validation Problems:
Ampersands (&'s) in URLs
http://www.htmlhelp.org/tools/validator/problems.html#amp
height=600 will overflow the availHeight value on most scr. res.
(800x600, even 1024x768 ones) and will therefore trigger error
correction mechanisms to adjust the window size. Cpu, time, RAM will
unneedlessly be involved to reduce this 600px height to something shorter.
As coded, the window will not be resizable, will not have scrollbars if
he content overflows the actual, real window dimensions and will not
have status bar. Preventing resizing the window and removing scrollbars
when they are needed is counter-accessibility and anti-usability: they
both go against the best and most objective interests of the user and
the author; therefore this can not be recommendable.
Not an event handler at all here. No function call; just an url.
wMap.focus();
Illogical.
self.close();
A window not opened by javascript can NOT be closed by javascript. So
the opener here must have been opened by javascript otherwise this
instruction will not be honored in NS 7.1 and will generate a security
warning in the javascript console.
}
In other browsers (NS 7.0/Win98, IE6/Win98) and in Netscape 7.0 for
Linux, it works fine.
What has changed in 7.1?????
Rgds,
Edwin
<script type="text/javascript">
var WindowObjectReference; // needs to be global
function OpenLinkWindow()
{
if(WindowObjectReference == null || WindowObjectReference.closed)
{
WindowObjectReference =
window.open("
http://naxos.orangeport.net/cyclades-info/ShowMap.php?id_advert=45&map=",
"RequestedPopup"',
"top=50,left=100,width=400,height=400,resizable=yes,scrollbars=yes,status=yes");
}
else
{
WindowObjectReference.focus();
};
}
</script>
http://www10.brinkster.com/doctorunclear/Netscape7/Popup/PopupAndNetscape7.html
Example of re-using a requested popup window (all according to
accessibility and usability guidelines):
http://www10.brinkster.com/doctorunclear/BrowserBugsSection/Opera7Bugs/Opera7Bugs.html
DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html