Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder StadriWebmaster's Avatar
    Join Date
    Aug 2011
    Location
    NY
    Posts
    42
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Popup window with no head code needed?

    I want to insert a link into an email that opens a new window of a specific size. All of the scripts I find require some code to be inserted into the <head> tag of the page. Obviously this will not work since I am inserting the link into an email. Is there a JavaScript code for opening a popup window that's not dependent on <head> code?

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,928
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Quote Originally Posted by StadriWebmaster View Post
    I want to insert a link into an email that opens a new window of a specific size. All of the scripts I find require some code to be inserted into the <head> tag of the page. Obviously this will not work since I am inserting the link into an email. Is there a JavaScript code for opening a popup window that's not dependent on <head> code?
    AFAIK what you are wanting is not possible.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #3
    New Coder StadriWebmaster's Avatar
    Join Date
    Aug 2011
    Location
    NY
    Posts
    42
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Philip M View Post
    AFAIK what you are wanting is not possible.
    I don't know what AFAIK means.

    I've seen it done before; it has to be possible.

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,928
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Quote Originally Posted by StadriWebmaster View Post
    I don't know what AFAIK means.

    I've seen it done before; it has to be possible.
    As Far As I Know.

    Where have you seen this done?

    Remember that modern browsers will block unrequested popups.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #5
    New Coder StadriWebmaster's Avatar
    Join Date
    Aug 2011
    Location
    NY
    Posts
    42
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Philip M View Post
    As Far As I Know.

    Where have you seen this done?

    Remember that modern browsers will block unrequested popups.
    Yeah, you're right. I forgot about the possibility of it getting blocked. Maybe I should just live with the window being full size. Thanks.

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,210
    Thanks
    75
    Thanked 4,343 Times in 4,309 Posts
    It may work with *SOME* email clients, but not with most.

    Most email clients only allow an <a href="xxxx"> in the email content and, indeed, then open a full sized window.

    *IF* the user's email client is browser-based (e.g., if they use a browser to read GMail), thne *IF* that client allows JavaScript in email, it could work. (No, it doesn't work with GMail, but it might with other browser-based email readers.)

    The only time I have seen this work was many years ago, when the email would have a simple <a> link and that <a> link lead to a page that *immediately* generated a popup and then closed the main window. But that trick doesn't work with most popup blockers today.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    StadriWebmaster (10-05-2011)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •