Help needed with popup window script

Discussion in 'Programming' started by Alicedigital, Jun 16, 2007.

  1. #1
    Alicedigital, Jun 16, 2007 IP
  2. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #2
    On a text link? Here is the simple way:
    <a href="no-js-fallback.htm" onclick="window.open(...); return false;">Open in new window</a>
    Code (markup):
     
    krt, Jun 16, 2007 IP
  3. Alicedigital

    Alicedigital Banned

    Messages:
    143
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How to adjust the size and get rid off the scroll bars and status bar etc etc..?
     
    Alicedigital, Jun 18, 2007 IP
  4. el_jentel1

    el_jentel1 Peon

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    try this:
    <a href="javascript:void(0)"onclick="window.open('{FILE}.htm','name','width={WIDTH},height={HEIGHT},scrollbars=no')">Open a new window</a>
    Code (markup):
    Replace:
    {FILE}: with the file name you want.
    {WIDTH}: with the width value
    {HEIGHT}: with the height value
     
    el_jentel1, Jun 18, 2007 IP
  5. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #5
    You can still get rid of more, and there are a few more options as well:
    window.open(url, '', 'toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=no, width=500, height=400, left=50, top=50');
    Code (markup):
     
    krt, Jun 18, 2007 IP
  6. Drew007

    Drew007 Peon

    Messages:
    310
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Is there a way to insert an html file from another domain?
     
    Drew007, Jun 26, 2007 IP