Hi
I am going to present a amount of picture and text (a catalog for auction house). I am using stored procedure in MS SQL to get det data. This method is very quick. It seems to that sometimes I am not getting any information about picture height and width. Here is the way i do it:
function formatPic(pic,sID){
var Img=new Image;
var iWidth;
var iHeight;
Img.src=pic;
iWidth=Img.width;
iHeight=Img.height;
return '<input type="image" id=' + pic + ' src=' + Img.src + ' width="' + iWidth / '5' + 'height="' + iHeight / '5' + '" border="0" alt="Klikk for Info/bud" onClick="showInfo('+ sID +')">';
}
Is there a better way?
Rune
I am going to present a amount of picture and text (a catalog for auction house). I am using stored procedure in MS SQL to get det data. This method is very quick. It seems to that sometimes I am not getting any information about picture height and width. Here is the way i do it:
function formatPic(pic,sID){
var Img=new Image;
var iWidth;
var iHeight;
Img.src=pic;
iWidth=Img.width;
iHeight=Img.height;
return '<input type="image" id=' + pic + ' src=' + Img.src + ' width="' + iWidth / '5' + 'height="' + iHeight / '5' + '" border="0" alt="Klikk for Info/bud" onClick="showInfo('+ sID +')">';
}
Is there a better way?
Rune