Popup window address is "about:blank", with text?

Discussion in 'HTML & Website Design' started by Corwin, Apr 19, 2009.

  1. #1
    I occasionally see popup windows with an address of about:blank, yet the window contains data. If I right-click on that window and select "Properties", I see the URL of the window is NOT about:blank.

    Seems like a neat trick.

    Can someone please tell me how this is done?
     
    Solved! View solution.
    Corwin, Apr 19, 2009 IP
  2. Mockup-Markup

    Mockup-Markup Peon

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    hmm, You could make a blank page and <IFRAME> the target page maybe. Haven't tested that though.
     
    Mockup-Markup, Apr 20, 2009 IP
  3. Corwin

    Corwin Well-Known Member

    Messages:
    2,438
    Likes Received:
    107
    Best Answers:
    0
    Trophy Points:
    195
    #3
    No, the address bar says "about:blank".

    I'd look at the code, but it's happened only on websites after I've done a shopping cart checkout, so I can't go back and look at the HTML without buying something again.
     
    Corwin, Apr 20, 2009 IP
  4. #4
    Easily done.

    1.- They create a popup as about:blank
    2.- They write the content using javascript so the page has content but not any url, stay as about:blank to avoid being blocked.

    
    <script language="javascript">
    // open the window 
    popup = window.open("", "popup", "width=320,height=210,scrollbars=yes"); 
    
    // write to window
    popup.document.writeln("<h2>This is written to popup by the main window</h2>"); 
    </script>
    
    Code (markup):
     
    cormack2009, Apr 20, 2009 IP
  5. Corwin

    Corwin Well-Known Member

    Messages:
    2,438
    Likes Received:
    107
    Best Answers:
    0
    Trophy Points:
    195
    #5
    Corwin, Apr 21, 2009 IP