Popup won't size in Safari

Discussion in 'JavaScript' started by fsinclaire, Dec 1, 2013.

  1. #1
    I use the following code to open a small popup. It works fine on a Mac with Opera 18 and Chrome 31, but Safari 7 opens the popup as a full page, ignoring the sizing (width=750,height=450). The script works fine on Windows with Firefox 25, IE 8, Sea Monkey 2.11. I will appreciate any ideas. Thank you.


     
    Solved! View solution.
    fsinclaire, Dec 1, 2013 IP
  2. fsinclaire

    fsinclaire Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    I have just tested the code on a Safari for Windows ver 5.1.7, and it works fine. I am beginning to think that the problem lies with Safari on my MacBook, some setting I have chosen in the Preferences, although I don't see anything like that there.
     
    fsinclaire, Dec 1, 2013 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Well, to put it in perspective it wouldn't even work for me in Opera or FF -- since I have the ability to open windows blocked in the preferences... Is there some reason you want to piss off users with that garbage?

    Though, where did you copy/paste that from as your quotes don't match. The non-ascii reverse double quotes if they exist in your code would mean the normal double quote before 'remote' might be treated as unclosed... and as such the 'name' of the window would be:

    remote”,”toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=750,height=450”);

    Though if so, there should be a logged error for an unterminated string when it hits the end of that line.

    Remember the rule -- non ascii7 characters (character codes outside the 0..127 range) have NO business in code... ANY code... regardless of language. That's why editing code in programs that auto-set things like quotes doesn't work. Did you do something silly like accidentally open the code in a word processor then accidentally hit save? (VERY easy mistake to make)
     
    deathshadow, Dec 3, 2013 IP
  4. fsinclaire

    fsinclaire Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    On my MacBook Pro 10.9 it works in both FF (ver 25.0.1) and Opera (ver 18), also in both of those browsers on a Windows laptop. As I wrote earlier, the only browser that it does not size properly is Safari on my Mac (Safari on my Windows laptop does work). And it may well be some setting I have inadvertently clicked on this Mac.

    The JS opens a popup only when a button on the home page is intentionally clicked by the visitor, so it is not a surprise popup. It offers a brief explanation of spoofing for those visitors who may have seemed to have received email from me.

    I do not remember.

    Originally, I had single quotes, as below, but then changed it when someone suggested that was my error. On reading your comment, I have restored it, but unfortunately the Mac Safari takes no notice.
    Thank you for your interest and ideas.
     
    fsinclaire, Dec 3, 2013 IP
  5. #5
    If all you want is to show some info at the click of a button, why don't you just show a hidden div with the info in it?
     
    PoPSiCLe, Dec 3, 2013 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #6
    Or just make it open in it's own page like you're supposed to?
     
    deathshadow, Dec 3, 2013 IP
  7. fsinclaire

    fsinclaire Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #7
    I'll do that.
     
    fsinclaire, Dec 3, 2013 IP