0

I have a simple function which opens up a popup window to show a rendered out preview email.

Works on all browsers except for Safari :(

$('#preview_email_btn').unbind('click').bind("click", function() {
    WHOAT.networking.postToServerWithAjax('/invite_preview', null, function (response) {
        var w = window.open("", "popupWindow", "width=640,height=600,scrollbars=yes");
        w.document.write(response);
    });
 });

How would this be updated to also support Safari?

Leon Gaban
  • 36,509
  • 115
  • 332
  • 529

1 Answers1

1

You have some restriction about popups at safari\chrome reference.

I would recommend you to use something like Jquery Modal UI, that way you don't have to worry about cross browser issues. Also check browser settings to allow popups.

Community
  • 1
  • 1
djluis
  • 362
  • 5
  • 19
  • 1
    Ah ok gonna do this, will render the response on another page and just redirect to that instead of a popup. It's an email preview so a modal over the page will be too big. Thanks – Leon Gaban Feb 12 '14 at 23:55