Pavan
Pavan

Reputation: 93

Window.open not working IN IE

I have this function

window.open("<%=mcrforHyperLink%>&fromDate="+fromDate+"&interfacen="+interfacen+"&interfaceid="+interfaceid+"&toDate="+toDate,'name_' +Math.floor(Math.random()*11),'height=680,width=900');

This is not in IE , but working fine under Mozilla .

please help .

Upvotes: 0

Views: 100

Answers (2)

Quentin
Quentin

Reputation: 943150

Internet Explorer can't handle window names that include a space. You don't have one, but I'd bet it also has problems when they include a . character (which you are generating with Math.random`). Make sure your name contains just alphanumerics.

Upvotes: 1

mplungjan
mplungjan

Reputation: 177692

Please explain why you are generating a random name for the window. If you were to re-use it elsewhere I could understand.

This will do exactly the same unless there is something I have missed

window.open("...",'_blank','height=680,width=900');

(the ... is your url)

Also please notice that most modern browsers may BLOCK your window open unless instructed otherwise. If the url is from the same domain as the page with the script, I suggest you ajax it into the page you are on.

Upvotes: 0

Related Questions