473,405 Members | 2,415 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,405 software developers and data experts.

Window.open() Doesn't work in IE 6&7

384 256MB
I have the below code and it works fine in FF but in IE 6&7 it wont work, gives an error to do with window.open??
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.             <!--
  3.             function radio(dirLevel) {
  4.                 window.open(dirLevel+"radio.html", "Radio", "status=1, height=120, width=450, resizable=0, top=20, left=20")
  5.             }
  6.             //-->
  7.           </script>
May 22 '09 #1
5 4463
Frinavale
9,735 Expert Mod 8TB
The window.open method accepts the following parameters:

window.open(URL,name,specs,replace)
Where:
  • URL: Specifies the URL of the page to open
  • name: Specifies the target attribute or the name of the window
  • specs: Is an optional, comma-separated list of items that specify how the child window should be displayed.

It looks as if you are calling the method properly and that you are providing the correct values as parameters to the method....so long as the URL you are providing is valid.

Check that your dirLevel contains a valid URL.
May 22 '09 #2
acoder
16,027 Expert Mod 8TB
What's the error message?
May 23 '09 #3
prabirchoudhury
162 100+
1. check the error frm firefox "error console"
2. you are looks like missing ";" semicolon after end of window.open line


window.open(dirLevel+"radio.html", "Radio", "status=1, height=120, width=450, resizable=0, top=20, left=20")
3. add a alert (dirLevel); inside the function to check that you are passing right directory link
4. if still the problem then add return false after window.open line
return false;
May 24 '09 #4
ziycon
384 256MB
Found out what it was, you wouldn't have gotten it as i just realised i posted the wrong code, it was being cause by a space in the name attribute, i replaced the space with and underscore and now its working fine.
May 25 '09 #5
prabirchoudhury
162 100+
thats nice .. enjoy coding..
May 25 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Edwin Boersma | last post by:
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() { ...
44
by: Carlos Andr?s | last post by:
Hi everybody. I've got a problem. I'd like to avoid opening a new window when you have pressed the shift key and you click in the left button of the mouse. I've tried the next solution, in the...
10
by: Marshall Dudley | last post by:
When I do the following line in Netscape, the popup loads as it should, but the parent window usually, but not always, reloads as well. <a href="#"...
14
by: Frances Del Rio | last post by:
I'm trying to open a url in a new window while pg loads (but NOT in a pop-up..) I need to do sthg like // while pg is loading.. window.location ='page.html' // but I need this to open in a...
18
by: Wladimir Borsov | last post by:
Inside a html page (more precicesly inside a JSP page) I defined a button. When the user clicks this button a second browser window should pop up und load the passed URL. I coded <img...
6
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser...
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
3
by: | last post by:
Hello, I try to open a new Window in code behind with : ClientScript.RegisterClientScriptBlock(this.GetType(), "MyOpenScript", "window.open('toto.doc');", true); My problem is that the new...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.