PDA

View Full Version : Web Designers: Can I restrict the size of the browser window from a link in an email?



Evan Wiener
11-01-2006, 01:56 PM
Is there a way to restrict the size of the browser window from a link in an e-mail? Say you have an e-mail with an HTML link to a page with a Flash movie that's 700 px by 200 px. Is there a way to get the browser window that opens from the link to be the same size as the movie, so there isn't a ton of whitespace shown? Normally, form a link in an HTML file, I would put JavaScript to define the window an onclick command, but how can you do that from a link in an email? I shouldn't use Java in an e-mail.

innocentboy
11-01-2006, 02:32 PM
pretty sure you can ... don't have the time to look it up.
if nobody answer when i do got the time, and i can find the answer, i'll give an answer to the best i can

Sheldo
11-01-2006, 02:36 PM
http://www.help4web.net/webmaster/window.html

that is a pretty cool tool for generating the HTML for popup windows. If you choose "by a Link" from the How should the window be opened dowpdown I think that should do it.

Evan Wiener
11-02-2006, 07:31 AM
http://www.help4web.net/webmaster/window.html

that is a pretty cool tool for generating the HTML for popup windows. If you choose "by a Link" from the How should the window be opened dowpdown I think that should do it.

Cool, I will give this a shot. From what I understand, you shouldn't use JavaScript to restirct a browser window size in an email.

Race
11-02-2006, 07:37 AM
Dreamweaver's Open Browser Window behavior lets you specify the dimension of the window being opened. I use it on my own website for pictures.

You have to enter "javascript:;" in the link destination, so the hand icon will show up when moused over.

THAT Sean!
11-02-2006, 07:45 AM
If you don't want Javascript in the email, then no, not that I'm aware of. But you can put Javascript in the page that will resize the browser window upon loading, though it won't remove the toolbars/status bar like if you made a JS launchwin-type link.

Evan Wiener
11-03-2006, 05:47 PM
I have been told Javascript is unreliable in emails and shouldn't be used. I know i can do it on a webpage in Dreamweaver. If I create a link in an HTML email the same way I would for a webpage, using Dreamweaver to create my code, will the link in the email work the same way as it would from a web page?

Talannon
11-03-2006, 06:25 PM
Like Sean said you could have javascript to resize your window onload or something like that.

Some people don't want javascript in email because you could get rejection of email by the server because of security issues. That is what I understand from that logic but I didn't research a lot on those reason.

That code (while I didn't test it) should work if you add it to your body tag.

onLoad="javascript: self.window.resizeTo(x.y);"

Race
11-03-2006, 06:28 PM
I have been told Javascript is unreliable in emails and shouldn't be used. I know i can do it on a webpage in Dreamweaver. If I create a link in an HTML email the same way I would for a webpage, using Dreamweaver to create my code, will the link in the email work the same way as it would from a web page?You would have to have Javascript on the page that opens, resizing it when it loads.

There would not be anyway for an email, or a link in an email to affect the size of a different window (that I know of).

EDIT: See the above post.

Evan Wiener
11-06-2006, 05:00 AM
You would have to have Javascript on the page that opens, resizing it when it loads.

There would not be anyway for an email, or a link in an email to affect the size of a different window (that I know of).

EDIT: See the above post.

I have a Flash movie I want to open in a browser window that resizes to about the size of the movie.

I tried the following, but the window was too small:
onLoad="javascript: self.window.resizeTo(x.y);"

Do I need to add space for the browser buttons, etc? I have a Flash movie that's 695 px x 195 px and want to resize the browser window to leave a little space below, maybe 30 px.

I'm beginning to think it would be easier to just remove the browser buttons, scroll bar, etc. but can't figure out how?

KingMob
11-06-2006, 05:33 AM
http://pressthebuttons.typepad.com/photos/uncategorized/bowser.jpg

THAT Sean!
11-06-2006, 05:54 AM
I have a Flash movie I want to open in a browser window that resizes to about the size of the movie.

I tried the following, but the window was too small:
onLoad="javascript: self.window.resizeTo(x.y);"

Do I need to add space for the browser buttons, etc? I have a Flash movie that's 695 px x 195 px and want to resize the browser window to leave a little space below, maybe 30 px.

I'm beginning to think it would be easier to just remove the browser buttons, scroll bar, etc. but can't figure out how?
You're just not going to be able to do what you want to do from an email, really. I would recommend sending people to a launch page, like Yahoo! Movies has or something, so you can then have your pristinely-cropped, toolbar-free popup.

Another consideration is to make the page the Flash object exists on stylishly simple: i.e. black background with some form of framing graphic/CSS around the Flash object.

I'll tell you this: if I clicked on an email link and the page I went to had a forced-resize, I would never go to that site again. I like my browser windows how I like 'em, and when someone tries to make it full-page or small, I wanna rip their throats out.

ClintP
11-06-2006, 05:59 AM
Here (http://www.javascript-coder.com/window-popup/javascript-window-open.phtml)is a link to a site that will help you. They have a working example and you can see how it will look. I hope this helps.