Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2793
I've been thanked 77 times.
Offline
Code:
<body onLoad="window.resizeTo(width,height); window.moveTo(100,50);">
the move to isn't necessary, but moves the window to a certain point on the screen measured from the lop-left (pixels right, pixeles down)
Last edited by Northie (2006-11-27 16:27:32)So far, so good.....
Got a dummy page made, and it's loading and resizing properly... in IE.
Firefox wants to load the page in a new tab, then resizes the whole browser....
Whats the tag for the target? I've tried 'new' and 'blank'. Suggestions?
Member
From: San Antonio, TX
Registered: 2006-08-07
Posts: 505
I've been thanked 27 times.
Offline
I believe this is what you're looking for
Code: javascript
<script language="JavaScript">
<!--
window.resizeTo(500,500)
-->
</script>
On the new page, you'll want to include something like this to cause it to close:
Code: html
<form><input type='button' value='Close Window' onclick='self.close()'><\/form>
Member
From: San Antonio, TX
Registered: 2006-08-07
Posts: 505
I've been thanked 27 times.
Offline
for the target, add an underscore to the front like: target="_blank"
Didn't seem to work... FF still opens in a new tab, instead of a new browser window.
Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2793
I've been thanked 77 times.
Offline
MrStitch wrote:
Didn't seem to work... FF still opens in a new tab, instead of a new browser window.
cool, i wish FF did that for me, i always get a new window rather than a new tab - must be localised settings
Firefox opens a new tab or window based mostly on the user's individual settings. You are probably not going to be able to do much about that.
The alternative would be to use the hidden DIV concept. That would work the same no matter what browser you were using, but then you'd have more complex Javascript to deal with.
I've actually got that concept in a portion of my work's program. It's not too tough.
Which version are you running?
I believe its standard issue with FF 2.0 that all 'new' type target tags go to a new tab instead of a whole new browser window.... however, I'd think that they would somehow leave it open for the 'what-if' situations... like this one.
It's the browser that is handling it, so I doubt a website can override it.
I'm running FF2, but I had the extensions that gave me the options when I was running older versions anyway.
Northie wrote:
cool, i wish FF did that for me, i always get a new window rather than a new tab - must be localised settings
FF Tools/Options/Tabs Check - New Pages Should Open In = A new tab
Like this. I use it all the time no probs in Ff, IE, Opera
Code:
<A HREF="javascript:OpenImageWindow('/folder/webpage.html','','250','206');">File Name</a>Works for me, might not be proper, but simple it is.
Dan
Dann.. I tried your approach, however the code didn't work. I click on my link and nothing happens. I don't know anything about JS, so I can't tell if that codes syntax is correct or not..... double check that?
I approached the forums at Mozilla.... almost got burned at the stake. Thought I was trying to work around the pop-up blocker. hahahhahha
They couldn't offer a solution either....
| Never |


