Re: Can't resize image on Firefox2.3

Martin Honnen <[email protected]> Sat, 09 Jun 2007 13:50:49 +0200
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Liberty Development
Message-ID <[email protected]>
pith phunsanit wrote:

> 1 ) i write photogallery as filestript on window
> if click on trumbinal photo have preview on mainpage
> and if image height more 450 px 
> it must display height 450px
>  
> i test on ie6 and opera 9.21
> but don't work in firefox 2.3 
> Why?
>  
> /* view.html */
> <script language="javascript">function display(img){ document.getElementById('display').innerHTML="<img id='imgx' src='"+img.src+"' />"; var image = document.getElementById('imgx'); if(image.height > 450){  image.height = 450; }}

Change that to e.g.
   function display (img) {
     document.getElementById('display').innerHTML =
       '<img id="imgx" src="' + img.src + '" ' +
       'onload="if (this.height > 450) { this.height = 450; }">';




-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/

_______________________________________________
dev-tech-xslt mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xslt