homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Window size from a href
without Javascript

 4:17 pm on Nov 22, 2002 (gmt 0)

Is there anyway of opening a new window to a specific height and width from an a href without using javascript? Maybe in CSS? We're doing a html email for a client and we cant use any javascript.

Thanks in advance!



 4:27 pm on Nov 22, 2002 (gmt 0)

No, I'm pretty sure what you are asking for is not possible without scripting.

Although you can control the desired size of the document using CSS but not actually the window it's being viewed in.

To control the windows you either need to coerce the user to resize the window or use scripting...

IMO either design for a fluid layout, or select a common window size and use a fixed sizing. In either case forcing me to resise my email window purely to view your newletter is a bad idea (again IMHO)...

- Tony


 4:33 pm on Nov 22, 2002 (gmt 0)

Can only confirm what Dreamquick wrote: no size definition without javascript.


 4:43 pm on Nov 22, 2002 (gmt 0)

Didn't think so but thanks anyway, I'll pass it on!

Cheers :)


 4:54 pm on Nov 22, 2002 (gmt 0)

Hi allybongo,

Maybe I got this wrong, (wouldn't be a first) but if you want to set a size to a new window opened from the HTML newsletter, you can use target = _blank in the href and onLoad=window.resizeTo(555,555) in the body tag of this new window.

Is it what you meant?


 6:55 pm on Nov 22, 2002 (gmt 0)

Macguru, that would work, but the onload event is javascript.


 7:00 pm on Nov 22, 2002 (gmt 0)

Yes, I know that. But I thought the JS was verboten only in the newsletter.


 7:15 pm on Nov 22, 2002 (gmt 0)

Ah, that makes sense to me now. No js in the newsletter itself so it gets by the filters.


 9:20 am on Nov 25, 2002 (gmt 0)

thanks for all the replies but unfortunately I can't touch the new window either! It links directly into a partner site of the clients. They have specified the resize in their site and obviously we are bypassing this so the result is a massive window.

Thanks for trying though! :)



 9:25 am on Nov 25, 2002 (gmt 0)

Just for historical footnote: didn't IE 3 report screen size and res via http headers?


 9:58 am on Nov 25, 2002 (gmt 0)

This old W3C correspondence [lists.w3.org] indicates that color depth and screen resolution were included in the header.

What a shame these didn't get included in the standard. As the letter points out, the information could be very useful when a wider variety of clients begin to access websites.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved