PDA

View Full Version : JSviewer - Dynamic HTML JavaScript slide show


seann
05-11-2004, 12:10 AM
I have just released JSviewer 1.3 on http://www.jsviewer.com/.

JSviewer is a robust, highly configurable, dynamic HTML image viewer written in JavaScript. You can create a slide show with JSviewer in a matter of minutes. JSviewer was designed to be easy to use for both web masters and end users, yet have very powerful features. JSviewer supports keyboard controls for controlling slide shows. Using the keyboard, you can turn image descriptions on or off, move buttons to the top or bottom of the window, make images appear randomly, and much more.

Regards,
Seann Herdejurgen
seann@herdejurgen.com

Vladdy
05-11-2004, 04:19 PM
The problem is that when JS is turned off or is unavailable, the content of the slideshow is lost to the visitor....

seann
05-11-2004, 06:19 PM
That's why the HTML template includes the following lines:

<noscript>
<font face=Arial,Helvetica color=red><b>You need to enable JavaScript to view these pages.</b></font>
</noscript>

If you go to http://www.jsviewer.com/demo with JavaScript disabled, you will receive this message.

Vladdy
05-11-2004, 06:54 PM
Yeah, that is exactly the problem I'm talking about.....

Philip M
05-11-2004, 08:33 PM
Tried it twice but I am sorry to say that it does not work for me at all. Select American Flag, get Golden Gate Bridge. Seems all over the place. Also, locks up my browser (twice) so had to CTL-ALT-DEL to escape.
Win 98FE, IE5.5.

Kor
05-13-2004, 10:06 AM
Vladdy... for a couple of weeks I wonder what the hack have you enter this forum as ALWAYS you said that user might have javascript disabled. Are you Devil's lawyer? We all suppose to discuss javascript issues here and you ALWAYS came with no solution, just mumbling that user might have javascript disable. So what. User might also have no browser or even no computer at all. "Tant pis", as the French says. I am not interested HERE in this forum about users with javascript disabled (not a significant proportion, anyway, at least not for me, for my company nor for my clients). We suppose to talk about javascript here, not about non-javascript. Make your own non-javascript forum, here or anywere, and throw there your black warnings...

Garadon
05-13-2004, 11:07 AM
To advertise for KL production and their entire 3 javascripts?

Oh and just a few comments to the script, scripts are better presented in an enviroment since that is where they will most likely be used.

And your zoom functionalites is bugged if I zoom enough it reverts at some point to the original size this goes for both in and out.

And if I counted correct I think taking 141 namespaces in the global scope is a bit much lol perhaps look into making it an object :)

And last but no least why do you make 1 large language file that makes the users download several unneeded kb's?

brothercake
05-13-2004, 11:12 AM
Vladdy has a fair point though - if javascript is disabled and as a result nothing is visible at all, then there is something wrong with the script. You can't just take javascript in isolation of other aspects of page design - the script is of particular interest sure, but if it fails to provide redundent content then it's a badly written script.

The whole point of allowing for non-javascript browsers is that support for javascript is not necessarily something a person can readily change. Some browsers don't support it, and a person may have no choice but to use that browser; or they may be in an environment where scripting is not allowed to run. Or they have have chosen to disable it because they use IE and there's no other way to be safe from parasites.

Whatever - the reasons are irrelevant - do those people not deserve equivalent access to content?

I'm sick of saying it personally. I'm tired of reminding people to provide redundency for script-generated content. I've pretty much given up - do what you want - I don't care.

You should be thankful that Vladdy can still be bothered to try.

Garadon
05-13-2004, 11:28 AM
Well in my opinion which most likely is noone elses cause then it wouldn't be mine.
Users with no javascript don't deserve equivalent content, they deserve content and that was given with the noscript tag if they want the real content they can go find something that can show it. Just cause you got a television you don't get access to all channels and a webpage is in essense a channel.

And I didn't really mean anything by the vlady comment, and btw vladdy your sitemap is out of date it don't include the slideshow script.

Kor
05-13-2004, 11:43 AM
Sir, you are right... to a certain extent.

But I wanted to emphasize that, after all, here is the DHTML or javascript Forum, not General web design Forum. I think anyone here are aware about the fact that javascript may be disabled, or at least they sould be. There is no use to repeat and repeat on and on to each and everybody the same old song.

If no alternative solution (and Vladdy did not even try to give an alternative clue or example) that endless and usless burden comes to vex me...

On the other hand it looks to me as like Vladdy hates (I know it is not so, but the manner he put the problem is so) javascript, DHTM, DOM and every client-side language. :cool:

And about users...In my opinion, to navigate with javascript disabled it's like enter the highway and run with 10 m/hour because you are affraid of accidents. You may be fined for that, as you slow down the traffic... If no javascript that users should open google and yahoo only.

A <noscript> message (as seann already did) it is enough, I reckon.

brothercake
05-13-2004, 12:34 PM
Users with no javascript don't deserve equivalent content
I'm not even going to gratify that with a response.

I think anyone here are aware about the fact that javascript may be disabled, or at least they should be.
Clearly they should be, but many are not; and as this thread testifies, many of those who are don't know what that actually implies.

<noscript> is not there to tell people they need to enable javascript. <noscript> is there to provide equivalent content for people who can't.

Vladdy
05-13-2004, 03:18 PM
Javascript is a tool.
And like with every other tools it has proper and improper applications. You use hammer to drive nails in, you do not use hammer to drive screws in (though you may succeed if you whack hard enough). The problem is that javascript is a "hammer" of web development. Every newbe with limited knowledge tries to use it for every possible problem they encounter and that results in more problem, some of which they are not even aware of.
For about 60% of the javascript questions presented here the answer is "DO NOT USE JAVASCRIPT to solve whatever problem you are trying to solve there" and for another 30% of the questions the answer is "this is not the way to use javascript in this application". That does not mean that javascript does not have its legitimate uses.

In most civilized countries accessibility of web content is the law. It is not about "client requests" nor "browsing demographics". If you, as a web developer, have any credibility you do not ignore that fact and you also educate your clients about the current state and trends in web development instead using "that is what client wants" as an excuse for your own incompetence.

Client side scripting and content accessiblity go well together. All you need to do is change your development approach: use scripting to work with existing content to enhance functionality/presentation.
It is simple development ladder to follow:
1. (X)HTML - content
2. - CSS - presentation
3. -- Scripting - adding functionality and enhancing presentation
It allows the page to degrade when Scripting and/or CSS is not available.

...

I got carried away here with trying to educate people about the modern methods of and approaches to web development and forgot about the real reason I'm dropping by these boards once in awhile, which is to promote my own stuff. So here is how you script a slide show: www.klproductions.com/klslideshow.html - accessible content and one global variable.

Kor
05-13-2004, 05:40 PM
As all we can see, HTML, CSS, Javascript... are developing according to the needs rather than to somoene's will. We all need more dynamics, more style. We sould rather try to seek the lack of security and try to improve Javascript than to give up and build intricate ultra-cross-javascript/nonjavascript codes. I respect your puritan way, but i feel that future development of web design will follow the dynamic perameter instead of static and "keep_the_old_solid" way...

If you talk about educate people... We should educate them to use new achievements, not to stuck them in the fear of new ways of doing something

Vladdy
05-13-2004, 06:20 PM
As all we can see, HTML, CSS, Javascript... are developing according to the needs rather than to somoene's will.
And one of the major needs is to make web content accessible to various users and devices. Web is no longer accessed by desktop computers running a known number of graphical browsers that you can account for. Current trend of separation of content from presentation from "bells and whistles" is based on that need. You can not expect your web site to look the same and have all the same functionality when accessed by a cell phone, or latest graphical browser running on 1600x1200 monitor, or by aural browser, or by SE bot or other data harversting program. If you want your site to have maximum exposure, you build it in layers that can be used (or not) by browsers depending on their capability and user needs (I doubt someone accessing a site by cell phone will appreciate 600x400 background image send thier way). If all you care about are graphical desktop browsers, you are the one stuck in the past.

We all need more dynamics, more style. We sould rather try to seek the lack of security and try to improve Javascript than to give up and build intricate ultra-cross-javascript/nonjavascript codes. I respect your puritan way, but i feel that future development of web design will follow the dynamic perameter instead of static and "keep_the_old_solid" way...
Once again, accessibility does not go against the dynamics and style.You do not need to create "intricate ultra-cross-javascript/nonjavascript codes" if you use "layered" approach to your design. I think I demonstrated it with my slideshow script:
- You start with the content (HTML), that is the foundation of your site.
- You add presentation (CSS)
- You add functionality (Scripting)
If a higher functionality layer is not available on the client, the page falls back to more basic presentation/functionality.
Technology does not limit you in making web sites that are both accessible and dynamic - your mindset and development methods do
I base my arguments about current state and future trends of web development of facts and observations, not "my feelings", and despite your impression I do not advocate minimalistic approach (if that is what you mean by "puritan ways").

If you talk about educate people... We should educate them to use new achievements, not to stuck them in the fear of new ways of doing something
New achievements open new ways of approaching tasks and solving problems. The modern approach to scripting requires taking accessibility of content into account.
Here is another example for you (random image script).
Old way:
<script language="Javascript">
images=new Array('image1.jpg','image2.jpg','image3.jpg');
document.write('<img src="' + images[Math.floor(Math.random()*images.length)] + '">');
</script>
New way
<script type="text/Javascript">
function setImage()
{ var images=new Array('image1.jpg','image2.jpg','image3.jpg');
document.getElementById('randomImage').src = images[Math.floor(Math.random()*images.length)];
}
</script>
...
<body onload="setImage()">
...
<img id="randomImage" src="image1.jpg" />

Not that hard, once you drop the luddite attitude, is it?
:thumbsup:

Kor
05-14-2004, 08:55 AM
If you want your site to have maximum exposure


But most of the time I don't want that, nor my clients. They have certain target users and they have no intention to use an intricate full cross-browser and full javascript/non-javascript code just to add one or two new possible customers. They put in ballance extra-time spend, money to be payed and extraweight of the code on one hand and possible few extra clients on the other hand. Almost always, they say: no thanks, it does not worth the effort...


Technology does not limit you in making web sites that are both accessible and dynamic - your mindset and development methods do


Of course. My clients limit me, not technology. This market is like anyother market. If you want to win, you must chose the quickest not the perfect way. I certainly would like ('cose I really like to) to build "universal" web pages, but, as I do not built them for me but for my clients, I have to sacrifice the "universality". I had clients which deffinetely wanted a site to be seen at 1024X768, even I've told them that a lot of people still have 800X600 rez monitors. They simply said : our clients have all 1024X768. What should I have to tell them? Nothing, as your client is allways right.

The general ideea is that (at least in UE): it does not worth the effort to build web pages which can be seen by all. Better add high functionality than lower the functionality to rise the accesibility. And if you want both (which, as you said, it can be done, of course) time and costs don't justify the expected results... That is what I wanted to emphasize...

brothercake
05-14-2004, 06:20 PM
Better add high functionality than lower the functionality to rise the accesibility. And if you want both (which, as you said, it can be done, of course) time and costs don't justify the expected results... That is what I wanted to emphasize...
That's a fair point, but doing it the accessible way is no more time-consuming or expensive, and not particularly more difficult, providing that you consider it right from the start.

Alex Vincent
05-15-2004, 01:02 AM
Puritan? Luddite? Not going to gratify with a response?

WHOA, TIME OUT!

This forum is the "Post a JavaScript" forum. I know I've critiqued a couple posted scripts in the past, but the comments I've seen in this thread go WAY overboard!

Let's limit our critiques to the script itself, NOT each other.

Kor
05-15-2004, 10:26 AM
ok ok... :p :rolleyes: ;)