navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Window size

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> Window size
Page: [1]
 
_gail

 

Posts: 2876
From: So FL
Status: offline

 
Window size - 12/27/2001 20:56:38   
I know there is a fairly simple java script which causes a window to open at a specified size when the link to it was clicked on from another page. Can anyone tell me what it is? I've searched, to no avail. The action when one clicks on the "preview" button here is exactly what I'm looking for.

Thank you.

Gail

PS Haven't visited here for a while. Very nice improvements to the site. Congratulations and thanks!
caywind

 

Posts: 1479
From: USA
Status: offline

 
RE: Window size - 12/28/2001 1:15:55   
is this it?

http://www.michael-thomas.com/javascript/ex_window_openclose.htm

All this to change a number into a name...

(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Window size - 12/28/2001 9:17:16   
Thank you, but no. This script creates a button.

I want to be able to create my own button (or use a word which can be linked to the smaller page). I want to hyperlink my button to a *page* that itself is smaller. The window size needs to be in the *page* itself. If I then wanted to make a link to it from any other page in a web, it would always open the smaller size.

Hope I've explained myslef correctly.

Any further suggestions would be appreciated. Thanks.

(in reply to _gail)
rdouglass

 

Posts: 9228
From: Biddeford, ME USA
Status: offline

 
RE: Window size - 12/28/2001 10:09:29   
I think this is what you're looking for...

Lets assume the page (that you want to open)is 'myInfo.htm' and you want it 500 x 300 pixels and you want it 10 pix in and 10 pix down from top left corner of screen. Put this code in your <head> </head> section of your targeted page:

<script>
function sizeMe() {
window.moveTo(10,10);
window.resizeTo(500,300)
}
</script>

Then, make the <body> tag look like this:

<body onload="javascript:sizeMe('myInfo.htm')">

Now, just be sure that when you open the page for a popup, you use target="_blank" in your hyperlink so it will open a new window and not load in the current window.

Caywind's sugestion would also work if you included a little in the Javascripts - namely size and location of window. I think however, this is what you're looking for.

Hope this helps....

EDIT: Can't spell worth crap!!

Edited by - rdouglass on 12/28/2001 10:11:48

(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Window size - 12/28/2001 11:26:56   
Thank you!

I'm obviuosly over my head. In any case, here's what I tried, with no success (and do not know how to correct the script):


<SCRIPT LANGUAGE="JavaScript">

<script><BR>function sizeMe()
{<BR>window.moveTo(10,10);<BR>window.resizeTo(300,300)<BR>}<BR></script>

// End -->
</SCRIPT>
</head>

<BODY>
<body bgcolor="#FCFCF5" link="#008000" vlink="#00A8A8" alink="#00F4F4">
<SCRIPT LANGUAGE="JavaScript">
<body onload="javascript:sizeMe('popup-page.htm')">

// End -->
</SCRIPT>

(in reply to _gail)
rdouglass

 

Posts: 9228
From: Biddeford, ME USA
Status: offline

 
RE: Window size - 12/28/2001 12:14:36   
OOPS! Should have told you: you need to copy and paste the code (from this forum) into Notepad first, then copy and paste into FP HTML view. That will get rid of all the formatting code ("<br>"s and such). It does need to look just like this:

<head>
(any other head code you have)
<script>
function sizeMe() {
window.moveTo(10,10);
window.resizeTo(300,300)
}
</script>
</head>

Also, you can't have 3 <body> tags - only 1. Make all of this:

<BODY>
<body bgcolor="#FCFCF5" link="#008000" vlink="#00A8A8" alink="#00F4F4">
<SCRIPT LANGUAGE="JavaScript">
<body onload="javascript:sizeMe('popup-page.htm')">

Look like this:

<body bgcolor="#FCFCF5" link="#008000" vlink="#00A8A8" alink="#00F4F4" onload="javascript:sizeMe('popup-page.htm')">

All of this needs to be on the popup-page.htm. Again, be sure to copy and paste into Notepad first....

 

Edited by - rdouglass on 12/28/2001 12:15:22

(in reply to _gail)
Xtreme2000

 

Posts: 218
From: Baldwin Park, CA USA
Status: offline

 
RE: Window size - 12/28/2001 14:44:15   
You can also do this if you want.


In the <head> tag area put these in there
<script language="JavaScript">
<!--
function open_on_entrance(url,name)
{

new_window = window.open('/yourfile.html','', ' menubar,resizable,dependent,status,width=400,height=250,left=10,top=10')}
// -->
</script>



In the <body> tag put the onload command in:
<body onload="open_on_entrance()">

WOLA!! you now will have the popup page.

Xtreme 2000
I do it right, and I'll do it right the first time!!!
Site in progress: http://Xtreme2000.idbinc.net


(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Window size - 12/28/2001 17:54:50   
I finally got it right, thanks to all those who offered help here (www.arborsnews.com > "See what's new" button). I can't tell you how much I appreciate it!

Happy New Year.

 

(in reply to _gail)
Xtreme2000

 

Posts: 218
From: Baldwin Park, CA USA
Status: offline

 
RE: Window size - 12/29/2001 20:55:51   
You're welcome Gail.. Happy New year!!!

Xtreme 2000
I do it right, and I'll do it right the first time!!!
Site in progress: http://Xtreme2000.idbinc.net


(in reply to _gail)
_gail

 

Posts: 2876
From: So FL
Status: offline

 
RE: Window size - 12/30/2001 12:28:06   
Is there a code to make the window "always on top" until you close it?

 

(in reply to _gail)
tryin_to_learn

 

Posts: 5
Joined: 10/22/2005
Status: offline

 
RE: Window size - 10/22/2005 7:46:51   
I found this thread via Google and it's exactly what I'm wanting, even though it's 4 years old. Hooray for Google. : )

Basically, I've got the same question as Gail except I'd also like to know how to control the chrome. rdouglass's solution works except I don't know where or how to put the window properties I need. I could do it for a popup, but since this is the window itself, I'm stumped. Xtreme2000's solution opens an original window and then puts the popup on top of it, which I'd rather avoid. I'm making a media player, so I only want one relatively small, chromeless window to open when you put the URL in your browser window.

Can anyone help?

(in reply to _gail)
jaybee

 

Posts: 14157
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Window size - 10/22/2005 8:13:17   
Welcome to OF.

This gives you all the parameters available.
http://www.javascripter.net/faq/openinga.htm

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to tryin_to_learn)
jaybee

 

Posts: 14157
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Window size - 10/22/2005 8:14:55   
As far as a window staying on top, it can be done but like most things doesn't work in all browsers. There is a hack which involves giving the pop-up focus ever time it loses focus but it then becomes a pain if you're trying to work with the background page.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to jaybee)
tryin_to_learn

 

Posts: 5
Joined: 10/22/2005
Status: offline

 
RE: Window size - 10/22/2005 8:35:32   
Thanks for the quick reply! However, unless I'm missing something, I don't think that's what I'm wanting. Is there a way to use those same properties but not as a popup -- I want to be able to just plop a URL in the address bar of my browser and have the window that opens be small and chromeless. I want there to only be one window -- no popup. Make sense? Is that possible?

< Message edited by tryin_to_learn -- 10/22/2005 8:58:21 >

(in reply to jaybee)
BeTheBall

 

Posts: 6359
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Window size - 10/22/2005 10:24:05   
Not possible. The size of the window will be the same as the window was when you entered the URL into the address bar.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to tryin_to_learn)
tryin_to_learn

 

Posts: 5
Joined: 10/22/2005
Status: offline

 
RE: Window size - 10/22/2005 11:03:06   
Ok, thanks. Now at least I don't have to keep fiddling with it and wondering why I'm not getting it.

(in reply to BeTheBall)
tryin_to_learn

 

Posts: 5
Joined: 10/22/2005
Status: offline

 
RE: Window size - 10/22/2005 11:17:00   
Ok, but wait a sec . . . I thought about this some more. rdouglass's sizeMe function resizes the window as it opens -- which seemed to accomplish what I wanted. It's just that it had all the annoying chrome on it. I thought there might be a way to add the properties to his function. I tried window.toolbar = false; window.toolbar = no; self.toolbar, etc, but none of those worked. Since the window is being resized onload, shouldn't there be a way to access its properties and manipulate those as well?

(in reply to tryin_to_learn)
jaybee

 

Posts: 14157
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Window size - 10/22/2005 12:16:06   
As far as I'm aware the chromeless properties only work with window.open. pop-ups. The other commands only have size parameters.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to tryin_to_learn)
jaybee

 

Posts: 14157
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Window size - 10/22/2005 12:18:35   
This link takes you to the chromeless guru. If there's nothing there then it can't be done.

There is a problem however, I can't get it to open in IE and in FF it isn't chromeless so I guess the hack isn't that good after all.

You may have better luck with the forum which is on
http://www.domestika.org/foros/viewforum.php?f=917

How good is your Spanish?

< Message edited by jaybee -- 10/22/2005 12:24:10 >


_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to jaybee)
tryin_to_learn

 

Posts: 5
Joined: 10/22/2005
Status: offline

 
RE: Window size - 10/22/2005 16:07:06   
Thanks. I took one look at some of those posts and decided it was too much sugar for a nickel. If it doesn't work on FF anyway, it doesn't seem worth doing. I'll just go back to the popup style.

(in reply to jaybee)
Page:   [1]

All Forums >> Web Development >> General Web Development >> Window size
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts