469,325 Members | 1,524 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,325 developers. It's quick & easy.

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 1862
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

Post your reply

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

Similar topics

5 posts views Thread by LRW | last post: by
1 post views Thread by Josh Payne | last post: by
7 posts views Thread by Coder | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.