Click to See Complete Forum and Search --> : newbie: set dimensions of original window
freedmania
07-07-2004, 03:52 PM
I know about openNewWindow(). Boy, do I know about it. It's all anyone seems to have written about. It certainly defines a new window created from a link on an open window.
Is there any way to set the dimensions of a window opened only by its URL? Or, for that matter, by redirection??
Simple stuff like this makes me very crazy...
Any help would be deeply appreciated.
- Paul
The only way to set the dimensions of a window is through JavaScript. (You could use VBScript, perhaps, but that's IE-only.)
freedmania
07-07-2004, 04:12 PM
I'm sorry to be so dense. Could you give me an example? Please assume I'm very dense. Start at <HTML> and go to </HTML>. I'd appreciate it very much.
Thanks.
Originally posted by freedmania
Is there any way to set the dimensions of a window opened only by its URL? Or, for that matter, by redirection??
There is some misunderstanding, obviously. The above question, to me, means: "How can I make a window resize itself when you go to it, or another page links to it?" Have I misunderstood your question?
freedmania
07-07-2004, 05:18 PM
That sounds like a very good way to phrase it. Can you give me an example? I can't visualize how to do this. Been back and forth through Negrino & Smith's "JavaScript for the World wide Web" all afternoon, too, and still can't see it.
Dense. That's me, all right.
Vladdy
07-07-2004, 06:00 PM
Use your time to make your site fit MY browser. Real browsers would not allow to manipulate the window, anyway
Freedmania, Vladdy is pointing out something which you may want to consider (while using irony in the process). Why would you resize someone's browser window? What if they wanted it bigger or smaller?
russell
07-07-2004, 06:18 PM
They are right, that is a rude thing to do. You should examine your reasons very closely before implementing it. Resizing my window is a sure way to make sure I never visit the site. Still... (works in IE6, NS7.1 -- didn't test any others)
<html>
<script><!--
function sizeMe() {
window.resizeTo(200,200);
}
// -->
</script>
</html>
<body onload="sizeMe()">
test
</body>
</html>
freedmania
07-07-2004, 06:30 PM
I'm a mere programmer. Graphically challenged, I look forward to anyone's suggestion as to how I should view his or her work. Perhaps the designer involved has a viewpoint I should consider.
Anyway, that's what my designer wanted on our site, so I set out to give it to him. Seemed the professional thing to do.
Thanks for the code, russell. I really appreciate it.
- Paul
Vladdy
07-07-2004, 06:50 PM
Seems like the designer has no clue how web works and how to design graphics for it :rolleyes:
freedmania
07-07-2004, 07:40 PM
Right again, Bucko. We have here two (2) print designers wondering why they can't turn the page when they're done.
Incidentally, I mentioned your observations to the Lead Designer. At first he balked - no mere reader dare question his need for the perfect aspect ratio. He relented after I'd given him what he wanted: a browser window effectively resized off his screen. Learn by doing.
I'm glad we had this little chat. Now for beer.
Vladdy
07-07-2004, 07:48 PM
Wanna show him/her more???
Get the real browser (Mozilla Firebird), open your site in it - then hit "Ctrl""+" a couple of times.