in reply to RE: RE: RE: A thought for JavaScript exiles
in thread A thought for JavaScript exiles

Um, in that code there is no need for a server-side check.

A non-JavaScript page may be needed for the merlyns of this world to access the page, but as it stands if the page comes back to the server then the user has already confirmed and you should do the action (assuming that the user is validated and all that).

In short the pop-up is a slight change for the user UI. If you don't have JavaScript then you don't get a chance to change your mind after hitting the big button.

Regards,
Ben

PS I know how you feel about JavaScript. Doesn't change the fact that a lot of people are told to use it in a work situation. People are paid to program in VB as well.

EDIT
Apparently I misinterpeted some comments yesterday. Sorry about that. I *didn't* know how you feel.

  • Comment on RE: RE: RE: RE: A thought for JavaScript exiles

Replies are listed 'Best First'.
RE: RE: RE: RE: RE: A thought for JavaScript exiles
by merlyn (Sage) on Aug 07, 2000 at 20:29 UTC
    PS I know how you feel about JavaScript. Doesn't change the fact that a lot of people are told to use it in a work situation. People are paid to program in VB as well.
    If you "know how {I} feel", your statement makes no sense. {grin} I don't mind that people write JS code, and even get paid for it.

    The conflict is when they use it to provide essential navigation services, or to provide client-side-only data validation. The former makes the site useless for many people. The latter is a security hole.

    I'm a very practical guy. Use whatever language works. Clientside JS does not work for either of the above cases, regardless of whether you are paid to do it or not.

    -- Randal L. Schwartz, Perl hacker

      I stand corrected on your feelings.

      I agree that there are few if any situations where pure JavaScript is a good idea. Certainly the example that you responded to had navigation that would only work if you had JavaScript enabled. That should definitely be (and in fact trivially could be) fixed. But the specific validation that it did is one that absolutely has no need to be repeated server-side. It is an, "annoying nanny" message, "Did you really want to do something you can't undo?" The server is safe to assume that if it got that, and the message is appropriately validated (a check which only makes sense server-side!), then it should go ahead.

      In that case merlyn will be given no annoying nanny message, others would, and all else will be the same. Actually merlyn probably sees that as being a good reason to turn JavaScript off. :-)

      Cheers,
      Ben