Need help with clan homepage please

Need help with clan homepage please

Help

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.

o
Looooney Ork

A galaxy far away

Joined
25 Feb 03
Moves
8046
04 Sep 03

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? 🙂

g
The Great Gonzo

Seattle

Joined
20 Jun 03
Moves
6115
04 Sep 03
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

g
The Great Gonzo

Seattle

Joined
20 Jun 03
Moves
6115
04 Sep 03
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".

o
Looooney Ork

A galaxy far away

Joined
25 Feb 03
Moves
8046
05 Sep 03

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 ) 🙂