Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macintosh 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!
    Graphicman

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Planet Earth Code Poet: True
    Posts
    282
    Thanks
    0
    Thanked 1 Time in 1 Post
    You would have to use a server-side language for this. I'll move you over to the server-side forum now.

  • #3
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?
    Graphicman

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Planet Earth Code Poet: True
    Posts
    282
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.

  • #5
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Graphicman

  • #6
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    John-
    Do you have the code to accomplish this?
    Thanks
    Graphicman

  • #7
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #8
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!!
    Graphicman

  • #9
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #10
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yep, that sounds like exactly what I'm looking for!
    Thanks again.
    Graphicman

  • #11
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Any chance of getting that code from you? I appreciate the help. Thanks.
    Graphicman

  • #12
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Here is the popup image viewer script:

    Code:
    <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>
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #13
    New Coder
    Join Date
    Apr 2008
    Posts
    31
    Thanks
    6
    Thanked 0 Times in 0 Posts
    i use EditPlus

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •