Help - Search - Members - Calendar
Full Version: HTML Pop Up Window Query
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
adam
Hey this is regarding HTML/Javascript.

I am using this code:

CODE
<a href="java script: void(0)" onClick="MM_openBrWindow('http://www.underoathfans.net/thealmost/audio/player.html','AudioPlayer','width=359,height=285')">Mp3 Player</a>


To create a pop up for my mp3 player.

I was wondering what code i would use in that link to make the pop ups screen position go to the top left of the page when opened?

Thanks

Adam
Darin McGrew
FWIW, you should use the href attribute for a real URL, like this:
CODE
<a href="http://www.underoathfans.net/thealmost/audio/player.html" onClick="MM_openBrWindow('http://www.underoathfans.net/thealmost/audio/player.html','AudioPlayer','width=359,height=285'); return false">Mp3 Player</a>
That way the link can work when JavaScript is disabled/unavailable, or when popups are disabled.

QUOTE(adam @ Mar 31 2007, 06:37 PM) *
I was wondering what code i would use in that link to make the pop ups screen position go to the top left of the page when opened?
Following the links in the FAQ entry How do I create a link that opens a new window of a specific size? found information on the top and left parameters, which look like what you want.
adam
Ah thanks. But i don't understand what i would do to make the pop up open with the screen position of X and Y or Top and Left changed to my specifications?

Sorry for my mistake but i'm not sure on what to do from looking at the FAQ.
pandy
The links. smile.gif
http://developer.mozilla.org/en/docs/DOM:w...d_size_features

You add top and left to the last set of parameters. The offset is in pixels.
CODE
'width=359,height=285,top=50,left=50'
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.