Click to See Complete Forum and Search --> : Resizing A Window
Nulrick
10-05-2003, 02:14 PM
HI!
I'm looking for a way so that when a button is pressed and a new page loads into the SAME window, the window can be resized to a specific size
so here's my link:
<A Href="newmemberprompt.html" Target="_self">BECOME A MEMBER</A>
can i add something so that when "newmemberprompt.html" loads, the window can be resized?
thanks a million !
Khalid Ali
10-05-2003, 02:47 PM
replace the body tag of the page tha you want to open with the one below,change the parameters as desired
first paramter is width
second is height
<body onload="window.resizeTo(400,200);">
Nulrick
10-05-2003, 03:04 PM
Interesting... this works fine, but in Explorer on a PC, the sizes I'm requesting don't appear to be the same as the result on Explorer on a MAC.
Explorer on the PC interprets the width and height values as smaller than they should be. My HTML page is just a flash (.swf) file that is width=300 height=200, but it gets chopped off.. but on a MAC, it fits perfectly.
Any ideas as to why this is happening?
Nulrick
10-05-2003, 03:22 PM
I got an email saying that I received a reply from you.. but there's nothing below.. can you repost?
thanks!
Khalid Ali
10-05-2003, 04:57 PM
You might have to do an OS detection and set the size according to the OS.
For the email,check your forums user settings( its a small button towards top left that says "user cp") and make it so that you do not get emails when your post get a response,
Nulrick
10-06-2003, 09:00 AM
okay.. I don't suppose you know how to do apply a browser detection?
thanks for your help!
Nulrick
10-06-2003, 11:29 AM
one more question for you.. this works (besides) the issue described above) in all browsers except Netscape on MACs.. the new window doesn't resize..
I'm wondering if there is a way to make it work for the browser as well?
thanks again!!
James L.
10-06-2003, 01:44 PM
Hey,
If you post your code or a link I will check it on my Mac and PC. You can also check your Javascript for errors in netscape by loading the page, then typing this in the address line:
javascript:
...don't forget the colon at the end. This will tell you if there are any errors. I typically find that my Javascript works better in Netscape (go figure), and if there are any problems it is with IE (go figure).
Nulrick
10-06-2003, 04:45 PM
http://newweb.rnktel.com/designdrafts/TheAxxessCard/indexstraight.html
click on "become a member"
(regarding the ..ahem.. content.. well, we web designers have to be opened minded right? :} )
thanks!