Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. image scrolling

image scrolling

Scheduled Pinned Locked Moved JavaScript
javatutorial
5 Posts 4 Posters 13 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 13076447
    wrote on last edited by
    #1

    using java scipt how to scroll images

    D R 2 Replies Last reply
    0
    • U User 13076447

      using java scipt how to scroll images

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You're going to have to go into a LOT more detail than that.

      Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak

      1 Reply Last reply
      0
      • U User 13076447

        using java scipt how to scroll images

        R Offline
        R Offline
        RedDk
        wrote on last edited by
        #3

        Simplest example:

            ![](file_found_in_same_folder_as_this_html_snippet.jpg)
        

        And now for a better question: Why can't I point to a file that is not in the same folder as the HTML file referencing the image I want to display? [EDIT] ... by hardcoding it in the body as a string, that is, like here, but providing a full path and drive location ..? [/EDIT]

        R 1 Reply Last reply
        0
        • R RedDk

          Simplest example:

              ![](file_found_in_same_folder_as_this_html_snippet.jpg)
          

          And now for a better question: Why can't I point to a file that is not in the same folder as the HTML file referencing the image I want to display? [EDIT] ... by hardcoding it in the body as a string, that is, like here, but providing a full path and drive location ..? [/EDIT]

          R Offline
          R Offline
          Richard Deeming
          wrote on last edited by
          #4

          RedDk wrote:

          a full path and drive location

          If you're loading an HTML file from your local disk, then you should be able to reference images from the same disk using a file path. (Although a File URI[^] would probably be safer.) If you're loading HTML from a website, then you cannot reference files on "your" local disk by providing a path and drive location. That path would refer to a location on the end-user's computer, which may not exist, or probably wouldn't contain the expected image. But even if it did, allowing websites to read the contents of their users' local file system would be a security risk.


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          R 1 Reply Last reply
          0
          • R Richard Deeming

            RedDk wrote:

            a full path and drive location

            If you're loading an HTML file from your local disk, then you should be able to reference images from the same disk using a file path. (Although a File URI[^] would probably be safer.) If you're loading HTML from a website, then you cannot reference files on "your" local disk by providing a path and drive location. That path would refer to a location on the end-user's computer, which may not exist, or probably wouldn't contain the expected image. But even if it did, allowing websites to read the contents of their users' local file system would be a security risk.


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            R Offline
            R Offline
            RedDk
            wrote on last edited by
            #5

            Lets see, how shall I word this ... It sounds as if I do indeed have a problem loading an image using an HTML file that I saved to my hardrive when, in fact, what I meant to say is that I would obviously use a script. And to show where the file is so that a function could get it for me I'd use "imageURL" and "push" it. But being in a rhetorical holiday mood I was being facetious and using this fast-as-all-get-out < img src= /> tag in order to make my sarcastic point. Why answer? Because using < img src="file:///C:/Users/Member_13108495/images/pianoGrande.jpg" /> loads only a broken page icon WHEN the HTML is using an extant path. The real point is that, in my understanding of it ... for purely security reasons, as you state, shuffling through the contents of a hardrive using a webbrowser is faux pas (even though Firefox doesn't "seem to have any problems with that" (quoting some nerd on SO yesterday)). The only way one could use < img src= /> is what I said in the displayed example I provided; the image has to be in the folder where the .html resides.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups