Re: numerous javascript new_windows

by "Steve Cost" <scost(at)neo.rr.com>

 Date:  Thu, 30 Nov 2000 21:32:17 -0500
 To:  "Cindy Stanley,
SSS" <stanleysupport(at)prodigy.net>,
<hwg-languages(at)hwg.org>
 References:  default
  todo: View Thread, Original
Try using single quotes (apostrophes) instead of double quotes within the
window.open argument.
FWIW, here is what I am using on one page:
<A href=""
onclick="window.open('cookies.htm','','menubar=no,resizable,scrollbars,width
=600,height=400');return false;">
HTH,
Steve

----- Original Message -----
From: "Cindy Stanley, SSS" <stanleysupport(at)prodigy.net>
To: <hwg-languages(at)hwg.org>
Sent: Thursday, November 30, 2000 7:30 PM
Subject: numerous javascript new_windows


| Hello All,
| I am trying to incorporate the following javascript into *one* document,
to
| be used with several links within:
|
| in the head of my document I have:
|
| <script language="JavaScript" type="text/javascript">
| <!--//BEGIN Script
| function new_window(url) {link =
|
window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=
| yes,scrollbars=yes,resizable=yes,width=522,height=282");}
| //END Script-->
| </script>
|
| in the body, in several places, I have:
|
| <a href="javascript:new_window('newdocument1.html')">text here</a>
| <a href="javascript:new_window('newdocument2.html')">text here</a>
| <a href="javascript:new_window('newdocument3.html')">text here</a>
|
| I continue to get "object expected" errors and "unidentified string" when
| trying to click open these *new windows*, which result in no window
opening.
|
| What do I need to do/change in the above code to be able to use this *new
| window* function throughout my document?
|
| Note: I have another <script> w/in the head of this same document, which
| activates my mouseovers. Is this causing any problems w/ trying to run 2
| scripts on one document?
|
| Thanks for helping one that is trying to learn  :)
|
| --
| Cindy K. Stanley
|

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