I am using localgetstorage and setstorage to load a list of links and show them as in a slideshow. The problem is that when I preview it on my PC it works, as soon as I try to use the page in my server online it won't work. Have I done something wrong?
Here's a link:
.html
It is very buggy and I'd rather just use a thirdparty slideshow plugin but I don't know where to find one that matches my needs and is free..
I am using localgetstorage and setstorage to load a list of links and show them as in a slideshow. The problem is that when I preview it on my PC it works, as soon as I try to use the page in my server online it won't work. Have I done something wrong?
Here's a link:
http://hem.bredband/noor/bildspelet/bildspelet.html
It is very buggy and I'd rather just use a thirdparty slideshow plugin but I don't know where to find one that matches my needs and is free..
Share Improve this question edited Apr 29, 2010 at 13:10 Mottie 86.5k30 gold badges130 silver badges248 bronze badges asked Apr 29, 2010 at 12:48 NoorNoor 2416 silver badges15 bronze badges 3- Are you trying to do things with different domains or sub-domains? Sometimes what works locally due to browser permissions suddenly won't work due to cross-domain concerns online. – justkt Commented Apr 29, 2010 at 12:49
- No this is basically just pulling in a list and showing them to you.. or maybe, i'm trying to pull in images from my harddrive, but this shouldn't stop it from working as it did a few versions ago.. almost identical, all i've done since then is centerize everything and a few lines of css.. i think – Noor Commented Apr 29, 2010 at 12:52
- You'd know for sure if you were using version control. Use Subversion, Git, or Mercurial and never look back. – Christopher Parker Commented Apr 29, 2010 at 19:47
4 Answers
Reset to default 5Do you reference the images in the right way? If I take a look at the source of your provided Link, I see references to your c:-Drive:
<b>C:\Users\Admin\Pictures\IMG_0005.JPG<br>
C:\Users\Admin\Pictures\IMG_0631.JPG<br>
C:\Users\Admin\Pictures\IMG_0322.JPG</b><br>
I know, in this case it's just plain text, but if you reference the images in the same way, it would explain your problems...
You can't read a local file in your HTML page unless you use the FileAPI (using a fileReader) But it is only implemented in firefox 3.6+ yet. May be it will be also in chrome 5.0
Here are some articles on this subject and a demo
You can also use OfflineAPI to store information about the file selection and DragDrop to extend user experience
Just had a similar problem. On localhost (XAMPP) i had the following.
<img src="images/table1.jpg" style="width: 100%; height: auto;" alt = ""/>
for some reasons my local server overlooked that the actual name of the image was table1.JPG, but the online server couldnot pick the extension in small caps.
<img src="images/table1.JPG" style="width: 100%; height: auto;" alt = ""/>
Check your permission status code for your images in your server, i think it should be 0664 and not 0660