| 
	
 | 
 Posted by Nonee on 07/09/38 11:30 
Just showing the picture is plain though.  As you can see from the 
code, it also has a title and a caption (close to go back or 
whatever).  I can do it via php though.  I never thought to go that 
direction.  Hmmm.... I will have to work on that.  I do hate js and 
try not to use it when I can. 
 
Question:  What do you mean popups are inaccessible?  You mean for 
accessibility features or do you mean popup blockers?   
 
On Fri, 28 Oct 2005 10:49:22 GMT, mbstevens 
<NOXwebmasterx@xmbstevensx.com> wrote: 
 
>Nonee wrote: 
>> Ok, here is the code.  I also included a func that tries to fix the 
>> window after the window is fully loaded.  The func is called but it 
>> still doesn't work.  Btw, the a = and x = is to get the image name 
>> from the thumbnail name... aka tnImage to Image. 
> 
>> 	var win = window.open("", "win", winproperty); // a window 
>> object 
>> 	var generator = win.document; 
>> 	var root = ""; 
>> 	 
>   .................PAGE OF CODE...................... 
>> 	generator.write('</html>'); 
>>  
>> 	generator.close(); 
>>  
>> } 
> 
>That whole page of "generator...." code seems excessive for a pop up  
>enlargement of an image.  Here's an example of a more reasonable  
>thumbnail click-through code: 
> 
><a href="images/11.jpg" 
>onclick="window.open('images/11.jpg','flowerwin','width=500,  
>height=406'); return false;"> 
><img src="images/1.jpg" width="50" height="41" alt="flower" /> 
><br />(Image opens in a new window.)<br /></a> 
> 
>I'm trying to ignore the fact that pop ups are generally a bad idea  
>because they are inaccessible.  Anyway, from the above code, you see  
>that you need just the images height and width to make the window pop up  
>the right size. 
> 
>If you really _must_ have all that code from the "generator..." section,  
>consider a normal link to an (X)HTML page, or generate a page from a  
>server side program. 
>http://www.mbstevens.com/howtothumb/ 
>may help. 
> 
>Now, how do you get that width and height?  Just as an example, you can  
>use the Perl module Image::Size available at cpan.org: 
>In a Perl script you would use: 
> 
>....... 
>use Image::Size; 
>........ 
>my ($im_w, $im_h, $im_type) = imgsize('example.jpg"); 
>........ 
> 
> 
>...and you have them. 
> 
> 
>
 
[Back to original message] 
 |