|
| |
|
|
_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!
|
|
|
|
_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.
|
|
|
|
_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>
|
|
|
|
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
|
|
|
|
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
|
|
|
|
_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.
|
|
|
|
_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?
|
|
|
|
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?
|
|
|
|
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 >
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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?
|
|
|
|
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.
|
|
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
|
|
|