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 15 of 15
  1. #1
    New to the CF scene
    Join Date
    Dec 2002
    Location
    Armpit of the US
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MOD please move to Serverside Forum: Most recent Image

    First off let me say hello.

    My question is; Does anyone know of a way to display the most recent image in a certain folder? So if a new image is uploaded it will be displayed instead of the older image.


    I am not sure if this is a HTML or Javascript question so that is why it is here in the General forum. If anyone feels it needs to be move then by all means, move it.

    Thanks in advance.

    J
    Last edited by Jebadia; 12-06-2002 at 05:11 PM.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    A 4D universe
    Posts
    1,337
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That will be server side... not client side.


    Ionsurge.
    http://www.mudsplat.com - Web design, print, and marketing solutions.

  • #3
    New to the CF scene
    Join Date
    Dec 2002
    Location
    Armpit of the US
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    Thanks for the response.

    Is there any way to move this topic to the ASP/JSP/PHP forum then?

    J

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Location
    A 4D universe
    Posts
    1,337
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Only mods can do that, I am just a wannabe mod...



    Ionsurge.
    http://www.mudsplat.com - Web design, print, and marketing solutions.

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Plus you'd be wanting to tell us "exactly" which serverside language (and possibly version thereof) that your host supports.

    No point telling you how to do it in PHP or Perl if you can only use ASP is there?
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.

  • #6
    New to the CF scene
    Join Date
    Dec 2002
    Location
    Armpit of the US
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No probably not.

    They allow all of the above but since I see you are Mr. PHP that would probably be easiest. Thanks for your reply, I really do appreciate it.

    J

  • #7
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what exactly do you mean display newest image?
    were is the image being displayed at?
    can you elaborate?

    btw the mods will move the threads whether you tell them to or not

  • #8
    New to the CF scene
    Join Date
    Dec 2002
    Location
    Armpit of the US
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Let me elaborate.

    Basically, I want the code to look for the most recent image in a certain folder (the same folder that contains the page) then display the image on a webpage. So when a new image is uploaded to that folder the code will then display the the new image till a new one is uploaded ... ect ...ect... and so on and so forth.

    I am trying to get away from just being able to display an image with a specified file name while refreshing the page with a Java script. See below

    <script language="Javascript">
    <!--
    function refreshCam(){
    rfsh = new Date() ; rfsh = "?"+rfsh.getTime()
    document.images["webcam"].src = "webcam.jpg"+rfsh
    setTimeout("refreshCam()", 5000)
    }
    //-->
    </script>
    </head>
    <body bgcolor="#FFFFFF" text="#080000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <b><font size="3" face="Arial"><p align="center">WebCam Page</p></font></b>
    <center><img src="webcam.jpg" name="webcam" width="352" height="288" border="0" alt="Finish Him!!!!!"></center>
    <script language="JavaScript">
    <!--
    if( document.images )
    refreshCam();
    //-->
    </script>

    Thanks for the assistance, it is very much appreciated.

    J

  • #9
    New Coder
    Join Date
    Jun 2002
    Location
    Glasgow, Scotland
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You're obviously going to have to upload the 'new' image to the folder and where you to call all these images 'webcam.jpg' then surely when you upload the new 'webcam.jpg' it'll overwrite the existing image?

    Or am I missing something here…

    meerkat
    Ya don't need a weatherman to know
    which way the wind blows...

  • #10
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so basically, you have an image displayed, and you are uploading another image manually? and you just want the page to display the newest image? are you wanting the image the update itself?

    i think im thinking the same thing meerkat is, why dont you just manually edit the markup ... otherwise if you relpace an image that has the same name, the next time the page is loaded then the new image will show ...

  • #11
    New to the CF scene
    Join Date
    Dec 2002
    Location
    Armpit of the US
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sorry, needed to explain that a bit better

    That is correct but I want to get away from doing that.

    There is a possibility that the image being uploaded will not have the file name webcam.jpg it could be webcam234234.jpg or something else and so I want that new image to be displayed instead. Thanks for your replies.

    J

  • #12
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    but are you uploading them yourself? or is it being done manually by anyone? if thats the case the editing the markup would be the easiest way, there are other ways to accomplish this, but it would require alot more effort
    im assuming you are looking for a script to dynamically write to the page?

  • #13
    New to the CF scene
    Join Date
    Dec 2002
    Location
    Armpit of the US
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No the upload will be automatic on an action from the webcam. The image will be uploaded with a time stamp in the file name, which, obviously, will change depending on the time uploaded.

    That is why I want the most recent image to be selected then displayed. Since the file name will not ever be the same the easiest way to do it (i belive) would be to select the most recent image in the folder. I now know this will take more than some simple HTML or Java script (ionsurge) and will in fact need to be server side coding. (PHP ASP JSP...) (Okii)

    Thanks all.

    J

  • #14
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    which language do you support?

  • #15
    New to the CF scene
    Join Date
    Dec 2002
    Location
    Armpit of the US
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If support= know then zero, I am a straight HTML kinda guy. None of that fancy stuff for me. That is why I came here.

    If by support you mean; which does my Host suport?-- then Perl, PHP and ASP.

    J
    Last edited by Jebadia; 12-06-2002 at 08:14 PM.


  •  

    Posting Permissions

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