1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

simple code needed

Discussion in 'JavaScript' started by Pianist, Sep 7, 2016.

  1. #1
    Hello everyone,

    I need a code to show an image from my hard drive and after 2 seconds replace it with another.... up to 3 times

    The images are locating at D:\
    (naming 1.jpg 2.jpg 3.jpg)
    The size of the images are all 1920x1080

    Sorry for my bad English
    Thanks in advance
     
    Pianist, Sep 7, 2016 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #2
    Your web browser isn't allowed to automatically access your hard drive for security reasons.

    Those images on your D:\ are going to have to be uploaded somewhere.
     
    sarahk, Sep 7, 2016 IP
  3. Naina S

    Naina S Active Member

    Messages:
    203
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    93
    #3
    JavaScript can access image only till the root of the website or it can access image placed on external domains. So regarding your question of accessing drive "D:\" with JavaScript, it is simply not possible.
     
    Naina S, Jan 18, 2017 IP
  4. Palash 'Zelloc' Bansal

    Palash 'Zelloc' Bansal Member

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #4
    I hope answers on stackoverflow page may help you- http://stackoverflow.com/questions/4090712/why-cant-i-do-img-src-c-localfile-jpg
    C: is not a recognized URI scheme. Try file://c|/... instead.
    Please let me know if it worked or not.
     
    Palash 'Zelloc' Bansal, Jan 29, 2017 IP
  5. Zoidrums

    Zoidrums Greenhorn

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    11
    #5
    Does your page just need to work on your own computer?
     
    Zoidrums, Feb 8, 2017 IP