user1049057
user1049057

Reputation: 459

jquery dialog for opening a popu up window in safari

I have a plain javascript function for opening a pop up window. This works fine in chrome and firefox. But in Safari, since pop up blocker is enabled by default, its neither opening the page nor there is no error notice.(is it possible to get an error notice?) Can this be done using any jquery method without using window.open(). Please someone help me in this?

var gomWin = window.open(popupURL, 'params');

Upvotes: 0

Views: 111

Answers (1)

POZ
POZ

Reputation: 591

There is no jQuery method that I know of to do that.

In order to test whether the call to window.open succeeded your should test the returned value:

var gomWin = window.open(popupURL, 'params');
if (gomWin === null)
  alert("Popup blocked!");

Upvotes: 1

Related Questions