Helpful Information
 
 
Category: Other server side languages / issues
dynamic image call in

I came accross a Javascript that checks to see what plug-ins are contained in the plug-ins folder of the respective browser. Then dynamically generates a table with a listing of the plugins and other related info.

I Would like do the same thing, but call in images instead. The catch is that the number of images would fluctuate. The comparison would be similar to ColdFusion where the database is searched and then displays the content.

In short, would like to be able to call in dynamic info into a table from an "images" folder without having to individually list each photo in an array. There are over 200 photos and this number changes frequently.

Any help would be greatly appreciated!

Thanks!
:)

You would have to use a server-side language for this. I'll move you over to the server-side forum now.

Server side processing is not available, that is the reason I am looking for a Javascript solution. The project would be burned onto CD and run in a browser. I gather Javascript is incapable of this?

Javascript does not have that ability. I beleive VBscript does but the it would only work in Internet Explorer, is that an option?

If it is burnt to a cd won't you know which images are there? Are you just not wanting to have to write all the image tags out? If you named the images in a numerical sequence you could easily use javascript to loop through and write them all out. Using that method you would just have to write a simple JavaScript that included the base name of the images along with the starting and ending numbers.

John-

Your last idea sounds like it might work for me. I would definitely know the first and last image to be included. That' exactly it....I don't want to have to enter every image into an array. So how do I go about doing this?

Thanks again.

John-
Do you have the code to accomplish this?
Thanks

You might want to post more precisely how you would like things to work with more details. And since this is going to be run on a CD I believe John also put together a little program to run web presentations off CD's.

Sure-

What I need to do is generate a table dynamically and load small thumbnail images into each table cell -- the images are generated from a digital camera and numbered sequentially. All this done in a browser (IE, NS4 compatible) window, loading from a CD (images on the CD also).
I know Javascript can generate tables dynamically. But, what I also need it to do is call in images and the image title into the table by listing the first and last image to load. The reason for this is due to the number of images. Listing each image in an array would be tedious to say the least.
Does this calrify what I'm looking for?
Thanks for your help!!

Yes that can be done with simple javascript as long as the images are named sequentially. Do you also want the thumbnail images to link to the full size images? If so I wrote a script for that awhile back that opens a popup window with the full size version of the image sized to the image.

Yep, that sounds like exactly what I'm looking for!
Thanks again.

Any chance of getting that code from you? I appreciate the help. Thanks.

Here is the popup image viewer script:



<html>
<head>
<title>Popup Image Viewer</title>
<script type="text/javascript">
<!--//
function imageView(imgFile,imgTitle,imgWidth,imgHeight,winPosX,winPosY){
preview = window.open("", "","resizable=no,toolbar=no,scrollbars=no,menubar=no,status=no,directories=no,width="+imgWidth+",height="+imgHeight+",left="+winPosX+",top="+winPosY+"");

preview.document.write('<html><head><title>'+imgTitle+' - Click to close - <\/title><\/head>'
+'<body onBlur="self.focus();" marginWidth="0" marginHeight="0" topmargin="0" leftmargin="0">'
+'<center>'
+'<a href="javascript:self.close()">'
+'<img border="0" alt="Image loading please wait...." src="'+imgFile+'" width="'+imgWidth+'" height="'+imgHeight+'">'
+'<\/a><\/center>'
+'<\/body><\/html>');
preview.document.close();
}
// -->
</script>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<!--// Parameter list as follows:
Image File
Title of Image
Width of Image
Height of Image
Window Position X coordinate
Window Position Y coordinate
//-->
<a href="javascript:imageView('images/australia08.jpg','Australian Limestone Desert',427,277,50,50)">
<img src="images/australia08thumb.jpg" width="84" height="55" border="0" alt="Click for larger image"></a>
<br>
<br>
<a href="javascript:imageView('images/australia11.jpg','Downtown Perth Australia',420,274,50,50)">
<img src="images/australia11thumb.jpg" width="84" height="55" border="0" alt="Click for larger image"></a>
</body>
</html>

i use EditPlus

just love the ftp functions it have. its also lightweight and have all the highlights and colorcoding i prefer :p










privacy (GDPR)