Re: netscape window control failing

by "Rythmist" <Rythmist(at)gamewood.net>

 Date:  Tue, 22 Aug 2000 14:56:02 -0400
 To:  <jonjab(at)whatsgrowing.com>,
<hwg-languages(at)hwg.org>
 References:  whatsgrowing
  todo: View Thread, Original
Hi,

> this should open a new window and name it:
> <a name="linky" onClick="window.open('second.html','example','')"><img
src="images/next.gif"></a><br>

I notice a syntax error (comma) in your parameters. Remove the comma or add
' ' after it.
Example: onclick="javascript:window.open('second.html','example','')"

Also your links with onClick should include javascript:.
Example: onClick="javascript:history.back()"

Open Method

The window.open method opens a new browser window. (Blank or containing a
specified document). You may also define attributes for the window as
detailed below.

SYNTAX
*winname = window.open(URL, name, options)
*winname is a variable that contains a reference to the new window object.
  You can use this variable when referring to a window.
*URL specifies the URL to open in the new window.
  name is the window name to use in the TARGET attribute of a <FORM>
  or <A> tag. The name can contain only alphanumeric or Underscore (_)
  characters.
*options is a comma-separated list of any of the options and values
displayed
  in the following table.

EXAMPLES:
win = window.open(" ", "new", "toolbar=0,height=200,width=100")
win = window.open("file.html", "new", "toolbar=1,scrollbar=0,status=yes")

A fully-equipped window full size
win = window.open(" ",  "new",  " ")

Note: (common causes of failures)
  no spaces in options list
  if height and width used, then both must be used.

For consistent results on all platforms, specify all items that you do not
want as item = 0.

Rythmist

----- Original Message -----
From: "jonjab" <jonjab(at)whatsgrowing.com>
To: <hwg-languages(at)hwg.org>
Sent: Tuesday, August 22, 2000 1:25 PM
Subject: netscape window control failing


> this works fine in IE, but I'm at a loss for netscape.  any suggestions?
>
> this should open a new window and name it:
> <a name="linky" onClick="window.open('second.html','example','')"><img
src="images/next.gif"></a><br>
>
> this should load a new page into the target window and close the current
one:
> <a href="exit.html"  target="example" onClick="window.close()">
> <img src="images/quit.gif" width="100" height="30" border="0">
> </a>
>
> this should take the current window back one page:
> <a name="back" onClick="history.back()">
>         <img src="images/back.gif" width="100" height="30" border="0">
> </a>
>
>
> again, these all work in IE.  I've seen references to earlier versions of
Netscape not interpreting the window commands well, but i'm all current at
4.7.
>
> -j
>
> --
> Jon Jablonski
> jonjab(at)whatsgrowing.com
> --
>

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA