views:

13

answers:

1

Hi, i would like to show some (about 5 to 10) EMF (Enhanced Metafile) Files in the IE 8. I use ASP to get all Files from a defined Folder and show them with the <img src=""> Tag. Some of the IMages are really big, so tried to reduce the size by setting its height to 100.

Is this the correct way? The Images load very slow and not all images are loaded. When i remove the height Attribute the Image is loaded.

Can you help me, do it right?

This is the Source:

<HTML>
<BODY>
<FORM NAME="alphabetSelection" method="get" action="new2.asp" target="home">
<TABLE width="100%">
<TR>
<TD width="4.1667%"><A href="new2.asp?clickedLink=a">A</A></TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=b">B</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=c">C</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=d">D</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=e">E</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=f">F</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=g">G</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=h">H</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=i">I</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=j">J</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=k">K</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=l">L</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=m">M</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=n">N</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=o">O</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=p">P</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=q">Q</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=r">R</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=s">S</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=t">T</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=u">U</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=v">V</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=w">W</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=x">X</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=y">Y</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=z">Z</TD>
</TR>
</TABLE>
</FORM>
<TABLE width="100%">
<TR>
<TD>Name</TD>
<TD>Bild</TD>
</TR>

<%
var todo=Request.QueryString("clickedLink");
if(Request.QueryString == "")
{
    todo = "a";
}
ShowFilesWithLetter(todo);


function ShowFilesWithLetter(theBeginningLetter) 
{  
    var folder = 'C:\\Force ASP\\FormularImages'; 

    var fso = new ActiveXObject('Scripting.FileSystemObject'); 
    var fold = fso.GetFolder(folder);
    var foundValues = false;
    for (files = new Enumerator(fold.files); !files.atEnd(); files.moveNext()) 
    { 
        Response.Write("<TR>");
        var thisFile = files.item(); 
        thisFile=thisFile.name.toLowerCase();
        if( thisFile.charAt(0) == theBeginningLetter )
        {
            Response.Write("<TD  >" + thisFile + "</TD>");
            Response.Write("<TD ><IMG height=\"100\" SRC=\"../FormularImages/" + thisFile + "\"  /></TD>\n");
            Response.Write("</TR>");    
            foundValues = true;
        }
    } 

    if(!foundValues)
    {
        var theLetter = new String(theBeginningLetter);
        theLetter = theLetter.toUpperCase();
        Response.Write("<TD COLSPAN=\"2\"><CENTER>No Images beginning with the Letter: " + theLetter  + " </CENTER></TD>");
    }
}
%>

</TABLE>
</BODY>
</HTML>
A: 

I don’t think there’s much you can do in the HTML to change the speed at which the images are loaded. If they’re big files, they’re going to be slow.

You could maybe try to create smaller versions of the images in your ASP code. I’m not familiar with ASP, so I don’t know what image manipulation capabilities are available.

Paul D. Waite
I have to use JScript for ASP (customer says) so i am still looking for a peace of code to do a kind of shortcut just for Display on a EMF File (Vector Grafik!)
camelord