Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open new browser at position 0,0

Status
Not open for further replies.

fiuPikeOY

Programmer
Jun 14, 2004
143
US
Hello,

I have a pop that unless it's launched in position 0, 0 you can't see the whole thing. Can some one tell me how I can give the new pop up window an absolute location?

Thanks
 
In the parameters you can set the left and top:

Code:
window.open(_url, _name, 'left=0,top=0');

Hope this helps,
Dan

[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Actually, I thought that was working but it's not. Here's my code

<a href="#" onclick="MM_openBrWindow('indexFlash.htm','','width=1020,height=700', 'left=0,top=0' )">Tutorial</a>

Is there anything wrong here?

Thanks
 
What browser are you using? Some automatically pad the page or automatically set margins.

[cheers]
Cheers!
Laura
 
when opening a new window with the window.open function it takes 3 parameters

1. window location
2. window name
3. window parameters (comma delimited string)

Your function MM_openBrWindow undoubtedly calls a window.open function with the supplied parameters. In your test case this is what you did: (seperated by color)
Code:
MM_openBrWindow([COLOR=red]'indexFlash.htm'[/color], [COLOR=blue]''[/color], [COLOR=green]'width=1020,height=700'[/color], [COLOR=purple]'left=0,top=0'[/color] )
As you can see there are 4 colors there (the blue is a bit hard to see as it is just 2 single quotations), which means you are attempting to pass 4 parameters to the window.open function. The solution is simple, just add the left and right parameters to the string that contains the other window parameters (in this case, height and width):

Code:
MM_openBrWindow([COLOR=red]'indexFlash.htm'[/color], [COLOR=blue]''[/color], [COLOR=green]'width=1020,height=700,left=0,top=0'[/color])

-kaht

...looks like you don't have a job, so why don't you get out there and feed Tina.
headbang.gif
[rockband]
headbang.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top