Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript enabled or not ... ?

Status
Not open for further replies.

dbeezzz

Technical User
Nov 30, 2005
54
KR
How much effort do you put into making sure your php scripts/apps are compatible to non-javascript enabled browsers ?

Do you use javascript strictly for client-side form first-time-validation. Or would you let javascript play an important part in your script/app ?

Also, what do you call your php programs ? ... scripts or applications ? Is phpbb a script or an application, in your opinion ?
 
Currently i am not working on PHP (Slightly out of touch), but when i was, i relied very less on Javascript for form validation etc. I used them but as a supplimentary to the server side validations.



--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
spookie said:
I used them but as a supplimentary to the server side validations.
Just as a side note, that's the only safe way to do it. Because JavaScript can be disabled on the client, it is unsafe to rely on it for validation. JS form validation is nice in that it saves the user a round-trip to the server, but server-side validation is always a requirement.

As for the role of JavaScript in an application, that really depends on what you're doing. I like to stick to the guideline that the basic functionality should still work even if you're using a text-only browser. Then again, that could be partly because I don't have an awful lot of JavaScript experience. At any rate, so long as you're not trusting security or data integrity to client-side code, I don't see anything necessarily wrong with using JS for important functionality. It all depends on your application and target users.

Lastly, it seems a little bizzare to characterize a full-blown forum system like phpBB as a "script". While you're at it, you might as well start calling Mathematica a "calculator program" and AutoCAD a "drawing program." It just doesn't do justice to the scope of the applciation. I could go on with my rant about how the entire "scripting vs. programming" distinction is completely bogus, but I'll spare you...this time. ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top