Hi,
I'we got some questions about making sites to work even if JS is disabled/blocked.
Now when i make forms, i just replace submit -> button and put javascript on it. So it doesn't submit and go through PHP validation, but this isn't sensible way cause if JS is blocked, site doesn't work at all. So how people handle this?
- Is it possible to change input type? If JS is enabled, you could change all submits to buttons (using jQuery or something?), and if JS is blocked, those stays as submits and goes through PHP validation.
- If form submit button has JS on it, can you block submit? So it would just go through JS and doesn't refresh whole page. If JS is blocked, it again would work as normal.
- Third option what i thought was hidden submit inputs. If JS isn't blocked, it would show hidden buttons, but if JS is blocked it shows submits.
So many ways to handle this thing, but what is the best and working way?
For navigation, the best strategy from a usability and SEO standpoint is to do the entire menu hard coded using CSS to style it with indents, etc. Then use JS to overwrite the CSS locally and toggle the display and/or visibility attributes in CSS to make menus accordion or fly out/down as desired.
That way the menu fails totally gracefully when JS is disabled.
That is not possible in this case. The form is on a Yahoo Store. There is no active language available on the Store server. The query language, RTML, runs only at publish after a store owner has updated the database and reviewed all the changes on pages RTML produces in the back office.
The form input gets validated by the separate server that runs the cart, but it's too late to let the user correct errors at that point. The back end will NOT throw out options where selection 0 is selected. I cannot even access the server that the cart runs on, so it is completely impossible to change that. The form verification I am looking for is intended to keep people from ordering items with "Please Choose" remaining selected for options, because every time that happens, the store owner must contact the buyer and find out what they really wanted for each option. JavaScript is my only possible way of doing this, and we just have to live with the instances where JS is disabled.
Whenever we do client side coding, we are bounded by the browser rules. If browser allow user the option to turn off Javascript or even Java, basically web-pages with Javascript cannot run and so does Java Applet.
But at current age and time, I would presume most user will enable Javascript and Java.
A classic example would be local banks in Singapore all uses Java Applet for the login page, so if you want to do internet banking, you got to install and enable Java isn't it ? I call such design as 'implicitly' forcing users to install and turn on Java.
I have not found a case where Javascript is strictly needed. Anyone want to give example of how companies/institutions "implicitly" forcing users to turn on Javascript ?
It would be interesting to take a poll about developer's thoughts on the role of JavaScript and Java Applets, but that isn't the question I am asking. I'd prefer to keep this thread focused on the question as presented.
Jim
Originally Posted by sohguanh
Whenever we do client side coding, we are bounded by the browser rules. If browser allow user the option to turn off Javascript or even Java, basically web-pages with Javascript cannot run and so does Java Applet.
But at current age and time, I would presume most user will enable Javascript and Java.
A classic example would be local banks in Singapore all uses Java Applet for the login page, so if you want to do internet banking, you got to install and enable Java isn't it ? I call such design as 'implicitly' forcing users to install and turn on Java.
I have not found a case where Javascript is strictly needed. Anyone want to give example of how companies/institutions "implicitly" forcing users to turn on Javascript ?
javascript can remove and add inputs, and ti can change input attribs, except for type.
code a version that works without JS, and have you js make whatever mods/additions you need. you can create a whole form in javascript if need be, but it's simpler to just change what you need.
Bookmarks