ajax but disable javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jpaul

    ajax but disable javascript

    Hi I am very new to this two

    If the browser disable the javascript, what happen to Ajax? can i slove
    the problem by using server side script? any suggestion for this?

    i currently do some dirty projects with perl/cgi, and I would like to
    add more client side features which relate to ajax, and do some
    validation on the client side with javascript. but it is possible that
    the javascript may be disable with some browsers. what can i do if the
    client's broweer disable the javascript.

    thank you

  • Ian Collins

    #2
    Re: ajax but disable javascript

    jpaul wrote:[color=blue]
    > Hi I am very new to this two
    >
    > If the browser disable the javascript, what happen to Ajax? can i slove
    > the problem by using server side script? any suggestion for this?
    >[/color]
    You're SOL if JavaScript is disabled.
    [color=blue]
    > i currently do some dirty projects with perl/cgi, and I would like to
    > add more client side features which relate to ajax, and do some
    > validation on the client side with javascript. but it is possible that
    > the javascript may be disable with some browsers. what can i do if the
    > client's broweer disable the javascript.
    >[/color]
    Fall back to conventional server side processing.

    --
    Ian Collins.

    Comment

    • optimistx

      #3
      Re: ajax but disable javascript


      "Ian Collins" <ian-news@hotmail.co m> kirjoitti viestissä
      news:4a3r8aFqn8 djU9@individual .net...[color=blue]
      > You're SOL if JavaScript is disabled.
      > --
      > Ian Collins.[/color]

      SOL? google gave over one million hits.


      Comment

      • Ian Collins

        #4
        Re: ajax but disable javascript

        optimistx wrote:[color=blue]
        > "Ian Collins" <ian-news@hotmail.co m> kirjoitti viestissä
        > news:4a3r8aFqn8 djU9@individual .net...
        >[color=green]
        >>You're SOL if JavaScript is disabled.
        >>--
        >>Ian Collins.[/color]
        >
        >
        > SOL? google gave over one million hits.
        >[/color]
        Sorry, I think it's an Americanism, the last two letters are Out of Luck.

        --
        Ian Collins.

        Comment

        • David Dorward

          #5
          Re: ajax but disable javascript

          jpaul wrote:[color=blue]
          > If the browser disable the javascript, what happen to Ajax?[/color]

          Ajax is a buzzword that basically means "Using JavaScript to make
          requests to the server and process the response".

          If JavaScript is disabled you can't use it to make such requests.
          [color=blue]
          > can i slove the problem by using server side script?[/color]

          That depends what the problem is. Ajax is just a technology. It might
          be used in a solution to a problem, but it isn't a solution in and of
          itself.
          [color=blue]
          > i currently do some dirty projects with perl/cgi, and I would like to
          > add more client side features which relate to ajax, and do some
          > validation on the client side with javascript.[/color]

          Never ever depend on the client to ensure data integrity / sanity. You
          are effectively asking the user to police themselves. By all means use
          it as a convienience to the user, but check the data again when it gets
          to the server.
          [color=blue]
          > but it is possible that the javascript may be disable with some browsers.
          > what can i do if the client's broweer disable the javascript.[/color]

          If its fluff, just forget about it, the user will get a slightly less
          nice experience (well, depending on the fluff, sometimes things work
          better without the JS).

          If it does something useful, have a server side fallback.

          Comment

          • jpaul

            #6
            Re: ajax but disable javascript

            I usually code javascript which embed in Html form before I call the
            server side script, I do all the validation in client side before it
            goes to Server side. But it isn't possible for me to know if the client
            already disable javascript. What method should I use to check for
            browser and javascript, so incase I will not send the Html form with
            Javascript that can not run in the client? The answer that I already
            think off is, using server side script to check and if the client isn't
            disable the javascript, then print the html form with javascript embed,
            else I should use all the server side script.

            Comment

            • Dylan Parry

              #7
              Re: ajax but disable javascript

              Pondering the eternal question of "Hobnobs or Rich Tea?", jpaul finally
              proclaimed:
              [color=blue]
              > I do all the validation in client side before it goes to Server side.
              > But it isn't possible for me to know if the client already disable
              > javascript.[/color]

              I'd just have the server-side scripting re-validate the user input
              anyway. That way people with Javascript support will have their input
              validated quickly without them having to wait for the server to respond,
              but as a fall back users without scripting enabled will still have their
              input validated, but in a slightly longer process.

              I wouldn't waste time trying to figure out whether the client supports
              scripting or not, and sending different pages. That's just counter
              productive.

              --
              Dylan Parry
              http://electricfreedom.org -- Where the Music Progressively Rocks!

              Comment

              • The Magpie

                #8
                Re: ajax but disable javascript

                jpaul wrote:[color=blue]
                > Hi I am very new to this two
                >
                > If the browser disable the javascript, what happen to Ajax? can i slove
                > the problem by using server side script? any suggestion for this?
                >[/color]
                Simple answer: AJAX stands for "Asynchrono us Javascript and XML".
                Therefore, without Javascript there can be no AJAX.

                Comment

                • David Dorward

                  #9
                  Re: ajax but disable javascript

                  Rich wrote:
                  [color=blue][color=green]
                  >>I wouldn't waste time trying to figure out whether the client supports
                  >>scripting or not, and sending different pages. That's just counter
                  >>productive.[/color][/color]
                  [color=blue]
                  > As a task of getting a project complete it can be counter productive, but
                  > as an end result the javascript validation can make the experience more
                  > polished and professional if done right.[/color]

                  So? Write one page that degrades gracefully if JavaScript isn't supported.


                  --
                  David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
                  Home is where the ~/.bashrc is

                  Comment

                  Working...