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

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

JavaScript and AJAX Forum

New window via Javascript
Control the margins?

 3:41 am on Mar 19, 2003 (gmt 0)

Hi everyone,

Got a javascript question: I'm trying to open an image in a new window...not an html file, but an image. Don't ask why :) But this is the proble: The image opens up in a new window just fine, but the new window has margins set in it. How can I remove the margins? Please note: I can't make an actual html page open, it has to be a certain test.jpg image file.

Is there a way to set no margins for the new window, in the originating link?

Thanks for any help,




 4:16 am on Mar 19, 2003 (gmt 0)

Can you do a document.write html file from the calling window? I don't think you can do anything to margins without some sort of css/html/javascript on the page.


 6:09 am on Mar 19, 2003 (gmt 0)


Do you mean actually writing an html file from the javascript code?


 7:19 am on Mar 19, 2003 (gmt 0)

Actually, what I ended up doing now is a work around - I just added 20 pixels to the width of the window, and made the margin uniform around the image. It's not perfect, but hey, it works.


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