Results 1 to 3 of 3
Thread: open new window javascript issue
-
03-12-2004, 04:00 PM #1Web Hosting Master
- Join Date
- Feb 2002
- Location
- New York
- Posts
- 791
open new window javascript issue
hello I am trying to get the following script to work but it doesn't nothing happens when I clikc the link??? any help PLZZ
<head><SCRIPT LANGUAGE="JavaScript">
<!-- begin
function go(url, tool, menu, loc, scroll, resize, status, left, top, width, height) {
OpenWin = this.open(url, "CtrlWindow", "toolbar=" + tool + ",menubar=" + menu + ",location=" +
loc + ",scrollbars=" + scroll + ",resizable=" + resize + ",status=" + status + ",left=" + left +
",top=" + top + ",width=" + width + ",height=" + height);
}
// end -->
</SCRIPT>
</head>
<body><a
href="javascript:go('http://www.yahoo.com','yes','yes','yes','yes','yes','yes','50','100
','750','400')" onMouseover="window.status='http://www.yahoo.com'; return true">
yahoo</a></body>
I need to be able to open the link in a new smaller window so I need help
-
03-12-2004, 04:56 PM #2Aspiring Evangelist
- Join Date
- Jan 2004
- Posts
- 406
It works for me (IE6 on XP). Do you have a pop up blocker? You may also want to try window.open instead of this.open.
-
03-18-2004, 10:02 AM #3Web Hosting Master
- Join Date
- Feb 2004
- Posts
- 772
Hi ,
Kindly refer this script and hope it will work for your task.
<head><SCRIPT LANGUAGE="JavaScript">
<!-- begin
function go(url, tool, menu, loc, scroll, resize, status, left, top, width, height) {
OpenWin = this.open(url, "CtrlWindow", "toolbar=" + tool + ",menubar=" + menu + ",location=" +
loc + ",scrollbars=" + scroll + ",resizable=" + resize + ",status=" + status + ",left=" + left +
",top=" + top + ",width=" + width + ",height=" + height);
}
// end -->
</SCRIPT>
</head>
<body><a
href="javascript:go('http://www.yahoo.com','yes','yes','yes','yes','yes','yes','50','100
','500','400')" onMouseover="window.status='http://www.yahoo.com'; return true">
yahoo</a></body>
It is opening with 500:400 Width:Height settings, working fine when i click
"yahoo"
Please check again ( save your script with .html ext )
Regards,
Bright