Click here to Skip to main content
Licence 
First Posted 16 Mar 2007
Views 15,271
Downloads 126
Bookmarked 10 times

Pop open according to the size of the image

By | 16 Mar 2007 | Article
Pop open according to the size of the image: Put images in the folder & give the name & path of the images & folder
Screenshot - ImagePopUp.jpg

Introduction

Article will open pop up according to the size of the image automatically

Background

Background to this article that I was working some client work where i have to open my popup according to the sizeof the image Which is on the client side.

Using the code

For Using this article user has to download the zip & unzip any where on the disc. Double click on the abc.htm & click on images link.

Blocks of code should be set as style "Formatted" like this:

//Code
// <script language="Javascript">
   function PopupPic(sPicURL) {
     window.open( "popup.htm?"+sPicURL, "",  
     "resizable=1,HEIGHT=200,WIDTH=200");
   }
   </script>
 <script language="'javascript'">
   var arrTemp=self.location.href.split("?");
   var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
   var NS = (navigator.appName=="Netscape")?true:false;

     function FitPic() {
       iWidth = (NS)?window.innerWidth:document.body.clientWidth;
       iHeight = (NS)?window.innerHeight:document.body.clientHeight;
       iWidth = document.images[0].width - iWidth;
       iHeight = document.images[0].height - iHeight;
       window.resizeBy(iWidth, iHeight);
       self.focus();
     };
 </script>
//

Points of Interest

Interesting point to be consider that java Script can do what ever we need on web.

History

I was working some client work where i have to open my popup according to the sizeof the image Which is on the client side.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Sachin Jain(Polaris India)

Software Developer (Senior)

India India

Member

I am software professional in Polaris india

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralUser Agent Detecting is From Prehistoric Ages Pinmembervolkan.ozcelik7:04 21 Mar '07  
GeneralDelete NS variable Pinmemberdadomingues1:31 20 Mar '07  
Generaldoesn't work in IE 7.... PinmemberTsjaar21:31 19 Mar '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120517.1 | Last Updated 17 Mar 2007
Article Copyright 2007 by Sachin Jain(Polaris India)
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid