SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast Pramit's Avatar
    Join Date
    Feb 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question AJAX without Javascript???

    I am using tw-sack for AJAX. But I am not sure whether my AJAX application will work on a browser with disabled javascript. Is there alternate way to use AJAX on javascript disabled browser?

  2. #2
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "AJAX" is a fancy term for "making HTTP requests via Javascript". So no, AJAX equals Javascript.

    You can of course make HTTP requests the traditional way

  3. #3
    SitePoint Enthusiast Pramit's Avatar
    Join Date
    Feb 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy No traditional HTTP request

    I need the application fully in AJAX. I cannot use traditional HTTP request

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,807
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    You must allow for traditional HTTP requests in order for your page to work in browsers where JavaScript is either not available or is disabled. If not then you have a web page that is broken for about 10% of your audience some of whom have been known to use anti-discrimination laws to take legal action against sites that discriminate against them because of their disability.

    You will get away with it for a personal or hobby site but for a commercial site not catering for blind people etc may result in a court appearance at some future date.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you write your javascript correctly, your site should degrade gracefully and allow the site to work without javascript. It may not be exactly the same way as it would be with ajax/javascript but it should still function.

    the best example for degrading gracefully is lightbox 2. If javascript is not enabled the links still work, and show you the image on a new page. But if javascript is enabled, it disables the links and works its magic.


  6. #6
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is just an idea, and I am not a professional web developer; but I do think that the pros get really wrapped up in the latest technique and sometimes make things a LOT more complex than they need to be.

    Most of the functions that AJAX is typically used for can be incorporated into a site by using those horrible frames everyone is so up in arms against. Just about every brower supports them, and they allow your users to get feedback when they click a link or enter data into a form without reloading the entire page.

    Then if Javascript is available, you can hide the frame and copy the response from that frame into the main page. The trick is that you must format the data comming from the server in a way that it can be read both by your javascript and by the user, which isn't really terribly hard. Use hidden fields in a form with a copy of the data or wrap visable data in spans with ID's or in anchors with titles. Any of those is then easily accessable in Javascript 1.0 without loading XML objects.

    If Javascript isn't available, the user can react to the data in the frame and potentially approve, reject, or just make note of the data comming back from the server. The approval can update the main page by reloading it, and you can explain to the user that it would work a lot better with Javascript on.

    Using that mashup of old and new, not only does it work if Javascript is not around, you also don't have to screw with browser dependancies, all the AJAX baggage (XMLthis and that), and you can easily debug server responses by just turing off Javascript in your browser.

    A professional web developer will now tell me why this is a terrible idea and probably be right; but I'm up for learning as much as the next guy.


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
  •