cometta
cometta

Reputation: 35759

window.open not working in firefox

alert(window.open('http://www.google.com'));

i tried this on firefox, and i get null, no prob in ie. any idea why?

Upvotes: 1

Views: 7456

Answers (4)

Alex
Alex

Reputation: 9740

Make sure you are not in incognito tab

 let confirmAnswer = confirm("Are you sure");
 if(confirmAnswer)
    {
      window.open'https://www.google.com');
    }

Upvotes: 0

Tom Harvey
Tom Harvey

Reputation: 200

Firefox will return null as it's essentially a void method - you're asking it to alert(null).

window.open(''); I believe is a null method anyway - but it certainly works in FF 3.5 on 10.6

Upvotes: 0

Ambat bhath
Ambat bhath

Reputation: 1455

I tried it and also got the result is in Message box Object and also the related web page opened.

When clicking the popup blocker it will ask security warning messsage just click yes with ctrl button you will get the result.

Upvotes: 0

Magnar
Magnar

Reputation: 28830

It certainly works for me in firefox. Could it be a popup-blocker?

Upvotes: 7

Related Questions