SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Modern Ajax script which detects if Ajax is supported

    I'm looking for a modern Ajax script which detects if Ajax exists. One that has been tested to be quick and reliable.

    I don't need it to do anything, only for it to send data to the server and receive the server's response.

    I prefer for it not to be with jQuery or any other library.

    I know the immediate response will be to tell me to check Google, and I have done, but I want one that is recommended by someone in the know and it must have a brilliant, reliable detection script that detects for Ajax support. I expect my websites to work on mobile devices and if full Ajax support isn't available then I want to offer fallback.

    Something like this would be ideal:

    Code:
    executeAjax(variables) {
    
     if(Ajax) {
     
      url = "file.php?" + variables;
     
      //perform action
    
    
    
      return server_response_text;   
     
     } else {
    
      return false;
     
     }
    
    }

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,527
    Mentioned
    84 Post(s)
    Tagged
    4 Thread(s)
    About the best one that's I've come across is MicroAJAX from the MicroJS.com website.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Addict
    Join Date
    Sep 2008
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great. Looks good. Just what I was looking for. Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •