x404.co.uk http://www.x404.co.uk/forum/ |
|
Javascript slideshow http://www.x404.co.uk/forum/viewtopic.php?f=4&t=4790 |
Page 1 of 1 |
Author: | tombolt [ Mon Dec 07, 2009 1:52 pm ] |
Post subject: | Javascript slideshow |
I'm putting a JavaScript slideshow in the portfolio section of my website. I know some of you browse with JavaScript turned off, but that's a pretty rare thing, so I'm not too bothered about people doing that as they'd made a conscious effort to switch it off and would expect reduced browsing as a result, but I was wondering if JavaScript will work okay with the iPhone and other smartphones? If this is going to be a problem, I'm also going to have to come up with a solution to show something else if JavaScript is disabled. I know nothing about JavaScript and have used a free plugin to create it. If this is going to be a problem, I'll post a link and maybe one of you clever folk would be able to point me in the right direction to sorting it out. Cheers all. |
Author: | Linux_User [ Mon Dec 07, 2009 2:00 pm ] | |||||||||
Post subject: | Re: Javascript slideshow | |||||||||
Somewhere, Nick is having a heart attack. ![]() |
Author: | tombolt [ Mon Dec 07, 2009 2:21 pm ] | |||||||||
Post subject: | Re: Javascript slideshow | |||||||||
Yeah! I understand not liking unnecessary use of javascript, but sometimes there's just no other way of doing it. Actually, I could have done this in flash, but it would have taken about twenty times as long. |
Author: | Nick [ Fri Dec 18, 2009 4:49 pm ] | |||||||||
Post subject: | Re: Javascript slideshow | |||||||||
If you are going to do it, then the best way to go about it is by having what you want to display to non-javascript browsers show as default. Then, you can use JavaScript to pull that out of the page and put your slideshow in. It might come as a pretty big surprise to hear that I actually did something myself for a site I made for someone a few years ago.
This particular example uses PHP to create the array, but I'm sure there are some JavaScript functions available to do the same thing. When the page loads, PHP throws a random image into the container. If they have JavaScript enabled, then that image will change periodically. If they don't have JavaScript enabled it will remain the same, and only change when they refresh the page. |
Author: | tombolt [ Tue Dec 22, 2009 10:50 am ] |
Post subject: | Re: Javascript slideshow |
That sounds ideal, thanks Nick. |
Author: | Nick [ Thu Dec 24, 2009 12:05 am ] |
Post subject: | Re: Javascript slideshow |
No worries. By the way, I tested on my iPhone and that JavaScript runs fine - the images switch just as they do on a 'real' computer. I also tried it on a PC and it works just as it does on a 'real' computer. ![]() |
Author: | big_D [ Tue Dec 29, 2009 7:08 am ] |
Post subject: | Re: Javascript slideshow |
Note: Adobe, Microsoft, Apple and Mozilla have all recommended their users turn off JavaScript this year - Mozilla currently says anybody not using versions 3.0.16 or 3.5.6 of Firefox should immediately disable JavaScript until they can upgrade due to in-the-wild exploits. Adobe also currently recommend that all users of all versions of Acrobat and Reader disable JavaScript until the next quarterly patch cycle (January 12th), where version 9.12 of both Acrobat and Reader will be updated. |
Author: | tombolt [ Wed Dec 30, 2009 10:46 am ] | |||||||||
Post subject: | Re: Javascript slideshow | |||||||||
Interesting, that hasn't filtered down to me, so I suspect a lot of people will not have heard to have done that! Doesn't that seriously reduce the functionality of sites like Facebook? |
Author: | big_D [ Wed Dec 30, 2009 1:31 pm ] |
Post subject: | Re: Javascript slideshow |
It has been in the news section of PC Pro, IT Pro, Mac User, ZDNet and CNet over the last couple of weeks... ![]() |
Author: | Nick [ Thu Dec 31, 2009 6:10 pm ] | ||||||||||||||||||
Post subject: | Re: Javascript slideshow | ||||||||||||||||||
It probably would, although I'd like to think that those sites would degrade properly I doubt they would work without JavaScript. You might get a nice message telling you that you don't have JavaScript turned on and that you need it. ![]() |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |