Closed Thread Icon

Preserved Topic: Open window help.... Pages that link to <a href="https://ozoneasylum.com/backlink?for=18276" title="Pages that link to Preserved Topic: Open window help...." rel="nofollow" >Preserved Topic: Open window help....\

 
Author Thread
Darkshadow
Paranoid (IV) Inmate

From:
Insane since: Jan 2001

posted posted 08-26-2001 23:01

Need help on opening an new window from an image with the margins set to 0 on the new window.

The code I have is this:-


onClick="MM_openBrWindow('Main/Image/01.jpg','01','','400','342','true')"

Is there anyway to just add some code to set the new window margins are set to 0, so the image within the new window does not have the default margins.

Any help?


mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 08-26-2001 23:19

You have two options. Either create HTML page that will conatin that image and set margins to 0, or use JavaScript to dynamically write HTML code to the window like this:

preview = window.open(/* your window open code should go here */);
preview.document.write("<html><head><title>Image Preview<\/title><\/head>\n");
preview.document.write("<body leftmargin=\"0\" rightmargin=\"0\" topmargin=\"0\" bottommargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n");
preview.document.write("<img src=\"some.image.jpg\" border=\"0\" width=\"320\" height=\"240\">\n");
preview.document.write("<\/body><\/html>");

BTW This code is just example that can help you to get started...

Darkshadow
Paranoid (IV) Inmate

From:
Insane since: Jan 2001

posted posted 08-27-2001 12:15

Thank you max.
I did tryed the code and it works some times , that just me not knowing code. but I will use the frist option of putting each image on a page with the margins set to 0.

Thanx anyway...

« BackwardsOnwards »

Show Forum Drop Down Menu