PDA

View Full Version : Should I use Javascript and CSS?


mishell
September 26th, 2003, 07:40 PM
Hello everyone,

I'm working on a website for a small independent bookstore, and I'm debating to what extent I should use CSS and Javascript. I want everyone to be able to view the site, regardless of what browsr they're using or whether they have Javascript turned on or not. I'm not too concerned with the site not looking exactly the way I want it to. I've seen it in old browsers and some things shift place, but it can still be navigated. I have been trying to use CSS and Javascript in ways that don't affect the content, i.e. buttons may not rollover and links may not lose their underline, but you can still get from point A to point B.

The point of this post:
I want to set up the content so that product details pop up in a separate, smaller window. I started doing this using Javascript, but then realized that it leaves those users who don’t support Javascript unable to see the product details. I have been searching for ways to make a pop up window without a script. I know I can always just use <a href> and use body onLoad to resize the window, but can’t figure out how to also get rid of toolbars, scroll bars, etc.

Another question: does modifying body onLoad work on all browsers?

Is this a valid concern or am I being too picky with trying to make the site accesible? Should I just use a Javascript pop up windows and forget about the minority who don’t support it?

Thanks!

renegade600
September 26th, 2003, 08:28 PM
Just a few thoughts...

1. You can get scripts that identify the users brower and send the visitor to specific pages based on the browser. Yessss it is javascript.
http://dynamicdrive.com/dynamicindex9/index.html

2. You also have to consider utilities that stops popups when opening additional windows. Also Mac computers, AOL and WebTV has their own sqecial problems with coding.

3. Create your site based on the latest browsers. Forget about the smaller browers. Personally when I finish a page, I will view it in Netscape 4.79, 7.1, Opera, Mozilla, MSIE. I will make minor changes according.

4. You may want to check into ASP, mysql and PHP as additional means of presenting your site.

5. Javascript is necessary on todays website. Theres really no avoiding it - especially in a store.

6. Onload is not compatible with all browsers. But then neither is css.
http://hotwired.lycos.com/webmonkey/reference/browser_chart/ (http://hotwired.lycos.com/webmonkey/reference/browser_chart/)

This is just a start and it can be very overwhelming. IMO - When designing you have to find a balance between the visitor, you the webmaster, and the store.

Steven.Bentley
September 26th, 2003, 08:52 PM
Certainly for accessibility you must use CSS really, because then your users can override it with their own stylesheet if, for example they require a larger font or need specific foreground and background colour combinations. The only part of CSS I would advise against is the positioning features, styles which set colours, font, size (as percentages), padding, margins etc can't really cause the content to lose meaning if the styles are ignored.

With JavaScript, provided that the content of the page can be used with JavaScript turned off then I'd say it was accessible. So by that I'd strongly advise against JavaScript for navigation, but I don't see any real harm in some of the more visual effects so long as they don't generate the content... although I take on board the point about shopping carts etc.

mishell
September 26th, 2003, 10:10 PM
Our server runs PHP and mySQL...still learning how to use them.

These are great resources. Thanks!