Please turn on javascript in your browser to play chess.
Help Forum

Help Forum

  1. Standard member orkyboy
    Looooney Ork
    04 Sep '03 20:45
    This is the best place to put this I think so here goes... How do you make pop-up windows on a homepage? Can someone help please?
  2. Standard member gregoftheweb
    The Great Gonzo
    04 Sep '03 21:36 / 5 edits
    essentially you can do it in a couple of ways.

    The simplest is to do this in HTML

    <a href="thepage.htm" target="_new"> click here to open window</a>

    Alternately you can get much more control by using javascript. There is a method in javascript coincidentally called window.open that handles this for you. It allows you to set size, position, what toolbars to show, whether the new window has scrollbars etc. It might look something like this in its simplest form.

    <a href="javascript:window.open('thepage.htm', '_new', 'width=400, height=300';" > click here to open window</a>

    this opens a window that is 400 pixels wide and 300 pixels high. No scrollbars, toolbars, statusbars, not resizeable, nothing. If you don't tell it something in the list of features then it won't turn it on.

    Here's a reference on it.
    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp
  3. Standard member gregoftheweb
    The Great Gonzo
    04 Sep '03 21:47 / 2 edits
    sloppy of me.

    <a href="javascript:window.open('thepage.htm', '_new', 'width=400, height=300';" > click here to open window</a>

    will work but the original page will navigate as well, which is wonky.

    you need to do this.

    <a href="#" onclick = "javascript:window.open('thepage.htm', '_new', 'width=400, height=300';" > click here to open window</a>

    or you could do this
    <span onclick= "javascript:window.open('thepage.htm', '_new', 'width=400, height=300';" > click here to open window</span>

    but then you would probably want to change the cursor style for the span tag to "hand".

  4. Standard member orkyboy
    Looooney Ork
    05 Sep '03 16:04
    Thanks. How do you make it so when you click on a link in opens a new window and displays the link page? ( like the old profiles did )