Hi. I´m developing a simple web site with PHP and MySQL. I work on WIN XP but the site will be used on some LINUX version. I used JavaScript to validate the data input by the users. My question is: Does JavaScript work on LINUX? If it doesn´t what shuold I use? I´m using something like this. I WANNA BE CLEAR. I´m only after the answer. This code works fine in XP. SCRIPT TYPE="text/javascript"> <!-- // check that they entered an amount tested, an amount passed, // and that they didn't pass units than they more than tested function TestDataCheck() { var qtytested = parseInt(document.testform.qtytested.value); var qtypassed = parseInt(document.testform.qtypassed.value); var returnval; if ( (qtytested >= 1) && (qtypassed >= 0) && (qtytested >= qtypassed)) returnval = true; else { alert("must enter the quantity tested and that amount or fewer for quantity passed"); returnval = false; } return returnval; } // --> </SCRIPT> <FORM ACTION="tres.htm" NAME="testform" onSubmit="return TestDataCheck()" > units tested: <INPUT NAME="qtytested" SIZE=3><BR> units passed: <INPUT NAME="qtypassed" SIZE=3><P> <INPUT TYPE=SUBMIT VALUE="Submit"> </FORM>
JavaScript is a browser based language and doesn't depend on operating systems. However, you should never rely on client-side validation alone, as it can be disabled by the user and he could pretty much do whatever he wants. Always use a server-side language to validate the user's input. You can additionally use Javascript to make it more comfortable for the user, and to avoid useless server load.
All versions of Firefox support JavaScript. Though, all browsers have their own way of parsing and handling the code. So certain things need to be coded differently for some browsers. But your code doesn't seem to be affected by this.
Yes. If the user is using a browser with javascript support and has it enabled (which is the case most of the time).