473,396 Members | 1,921 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,396 software developers and data experts.

Javascript throws error in IE but works fine in Firefox

112 100+
I have an asp page that call a java script function to open a new window. this works well in Firefox, but in IE, it does not work. When I check the error on page at the bottom of the page, it gives me the error as "Invalid argument." I did check the syntax but could not find anything wrong with it. Can somebody please guide me on this.

Please find my code below

Expand|Select|Wrap|Line Numbers
  1. function popup(studentID)
  2. {
  3. //alert(studentID);
  4.     var answer = confirm  ("Are you sure you want to delete this student?");
  5.     var page;
  6.     page = "deletestudent.asp?id="+studentID;
  7.  
  8.     if (answer)
  9.     {
  10.     window.open(page, "Delete Student","location=1,status=1,scrollbars=1,width=100,height=100");
  11.         location.reload();
  12.         return true;
  13.     }
  14.     else
  15.     {
  16.         location.reload();
  17.         return false;
  18.     }
  19.  
  20. }
thank you
May 26 '10 #1

✓ answered by user1980

@user1980
hi..

I could make it work..window.open has a page name, Delete Student. I did remove the space and it works fine now.

Thanks

1 1963
user1980
112 100+
@user1980
hi..

I could make it work..window.open has a page name, Delete Student. I did remove the space and it works fine now.

Thanks
May 26 '10 #2

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

Similar topics

5
by: LRW | last post by:
(Sorry if this is a repost...my newsreader keeps crashing on the posting--I don't know if the message going out or not) For some reason this javascript just won't work in Firefox. It works fine...
14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
2
by: Derrick | last post by:
Trying this code in the Page_Load of a C# web page... private void Page_Load(object sender, System.EventArgs e) { string connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data...
1
by: Josh Payne | last post by:
I get the following error when trying to use a web service with the SOAP Toolkit: WSDLReader:Could not find '/definitions' inside the default WSDL namespace HRESULT=0x80004005: Unspecified error...
1
by: dasayu | last post by:
Hi, I have a custom object called gridWidget. I am consistantly getting an error in FireFox when I click on an href, which calls a function defined on the object. The generated link looks similar...
7
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script...
7
by: mdw9604 | last post by:
Hi all, I am newbie at javascript, but I have a script that animates gif images and worked for a number of years, but now with IE7 it does not work. I am getting an error on this line of...
3
by: knkk | last post by:
I have a link called "Save" on a page of mine, which, when clicked on (the url is typically like this) javascript:savesubmit('form31','results31','1','movies','178'), calls a javascript function...
5
by: Anand Ganesh | last post by:
Hello Everybody, I have a line in a Javascript function as follows <%=ServerSideVariable%>; This works fine in 2005.NET But in 2008.NET Visual Web Developer this gives as warning saying...
13
by: Stever1975 | last post by:
I'm working on something similiar to a shopping cart item page. There is a table of items. Each item has an image, a textbox for the qty and an image for the add button. When the add image is...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.