ajax but disable javascript

Discussion in 'Javascript' started by jpaul, Apr 12, 2006.

  1. jpaul

    jpaul Guest

    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
     
    jpaul, Apr 12, 2006
    #1
    1. Advertising

  2. jpaul

    Ian Collins Guest

    jpaul wrote:
    > 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?
    >

    You're SOL if JavaScript is disabled.

    > 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.
    >

    Fall back to conventional server side processing.

    --
    Ian Collins.
     
    Ian Collins, Apr 12, 2006
    #2
    1. Advertising

  3. jpaul

    optimistx Guest

    "Ian Collins" <> kirjoitti viestissä
    news:...
    > You're SOL if JavaScript is disabled.
    > --
    > Ian Collins.


    SOL? google gave over one million hits.
     
    optimistx, Apr 12, 2006
    #3
  4. jpaul

    Ian Collins Guest

    optimistx wrote:
    > "Ian Collins" <> kirjoitti viestissä
    > news:...
    >
    >>You're SOL if JavaScript is disabled.
    >>--
    >>Ian Collins.

    >
    >
    > SOL? google gave over one million hits.
    >

    Sorry, I think it's an Americanism, the last two letters are Out of Luck.

    --
    Ian Collins.
     
    Ian Collins, Apr 12, 2006
    #4
  5. jpaul wrote:
    > If the browser disable the javascript, what happen to Ajax?


    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.

    > can i slove the problem by using server side script?


    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.

    > 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.


    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.

    > 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.


    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.
     
    David Dorward, Apr 12, 2006
    #5
  6. jpaul

    jpaul Guest

    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.
     
    jpaul, Apr 12, 2006
    #6
  7. jpaul

    Dylan Parry Guest

    Pondering the eternal question of "Hobnobs or Rich Tea?", jpaul finally
    proclaimed:

    > 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.


    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!
     
    Dylan Parry, Apr 12, 2006
    #7
  8. jpaul

    The Magpie Guest

    jpaul wrote:
    > 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?
    >

    Simple answer: AJAX stands for "Asynchronous Javascript and XML".
    Therefore, without Javascript there can be no AJAX.
     
    The Magpie, Apr 12, 2006
    #8
  9. jpaul

    Rich Guest

    On Wed, 12 Apr 2006 16:52:18 +0100, Dylan Parry wrote...
    >
    >Pondering the eternal question of "Hobnobs or Rich Tea?", jpaul finally
    >proclaimed:
    >
    >> 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.

    >
    >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.
    >


    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.

    Client-side validation can make the experience a little prettier for folks that
    have javascript enabled, but in either case I would not rely on the submitted
    data itself. It's pretty easy to bypass javascript form validation, so you
    always want to error check it on the server before doing anything with the
    submitted data.

    Rich


    --
    Newsguy Bandwidth Blowout April-18-2006
    Unlimited downloads all day long
    http://newsguy.com/nolimits.htm
     
    Rich, Apr 12, 2006
    #9
  10. Rich wrote:

    >>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.


    > 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.


    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
     
    David Dorward, Apr 12, 2006
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris  Ashley
    Replies:
    1
    Views:
    2,839
    =?Utf-8?B?RGF2aWQgSmVzc2Vl?=
    Dec 16, 2005
  2. John_Woo
    Replies:
    13
    Views:
    971
    Michael Rauscher
    Sep 29, 2006
  3. minnie
    Replies:
    1
    Views:
    736
    Andrew Thompson
    Dec 13, 2006
  4. Nathan Sokalski
    Replies:
    2
    Views:
    507
    Nathan Sokalski
    Jun 2, 2007
  5. Jimmy
    Replies:
    3
    Views:
    146
    Thomas 'PointedEars' Lahn
    Aug 13, 2007
Loading...

Share This Page