Should we offer a no-JS alternative?

  • Thread starter Thread starter Sic
  • Start date Start date

Sic

Sic

Soldato
Joined
9 Nov 2004
Posts
15,365
Location
SO16
I was wondering if I could bend someone's digital ears on a subject that's bothering me right now.

I'm putting together a technical demo which contains all the most advanced PHP/MySQL/Javascript/CSS that I know, for my portfolio and I've reached a bit of a conundrum. I basically need the selection of a select list to change the name of another select list, and obviously, Javascript/DOM is the only way to go about this. For backwards-compatibility/accommodating technophobes, I obviously need to make this facility available universally (although it's meant to be housed on an intranet) - do i:

1. put up a 'you need javascript' warning
2. put up a 'because of your lack of javascript, you will need to make sure the following things are changed manually
3. none of the above

I'm just wondering what people would do in this instance as it's not something that can be easily accommodated without Javascript. I appreciate your input.

:)
 
Sic said:
I was wondering if I could bend someone's digital ears on a subject that's bothering me right now.

I'm putting together a technical demo which contains all the most advanced PHP/MySQL/Javascript/CSS that I know, for my portfolio and I've reached a bit of a conundrum. I basically need the selection of a select list to change the name of another select list, and obviously, Javascript/DOM is the only way to go about this. For backwards-compatibility/accommodating technophobes, I obviously need to make this facility available universally (although it's meant to be housed on an intranet) - do i:

1. put up a 'you need javascript' warning
2. put up a 'because of your lack of javascript, you will need to make sure the following things are changed manually
3. none of the above

I'm just wondering what people would do in this instance as it's not something that can be easily accommodated without Javascript. I appreciate your input.

:)


Can't you get the select list to post the form back to the server which regenerates the page with the altered name?
 
to elaborate, everything's an array. the value of the first array becomes the key to the second select list, so it'd be a big pain. everything can be altered after a user makes their input though. your way would be possible, but it'd be such a pain.
 
Many sites use the self posting method to facilitate for non JS users. A non JS version is also required for accessibility compatibility as JS doesn;t work with some tools used by disabled users.
 
well you have a choice, a friendly message within <noscript> tags informing users they need to enable javascript or as mentioned above, submit the page to itself and dynamically generate the select lists using php. i guess you'd have to use an associative array to do what you want? infact my form page (link in sig) does just that. 2 of it's drop down lists are dynamically generated from php arrays.... :p
 
Yes, you should write it to cater for non-JS users.

It's not difficult, there are *very* few circumstances where JS is a must and the functionality provided by it cannot be provided by post/get server side scripting.
 
Back
Top Bottom