+ Reply to Thread
Results 1 to 3 of 3

Thread: AJAX Loading Message

  1. #1
    Junior Member
    Join Date
    Jun 2006
    Posts
    46

    Default AJAX Loading Message

    How would I go about telling the user their request was loading? For example, if a form was submitted using AJAX, how could I say it was loading, then have it say it was finished when it was finished. With the XMLHttpRequestObject status codes?
    My ongoing projects...
    www.naturesmagazine.com
    www.energyreform.org *new domain*
    www.photographyavenue.com
    ----
    You may also remember me as imnewtophp...

  2. #2
    Forum Leader
    Join Date
    Jul 2005
    Location
    Leeds, England
    Posts
    648

    Smile

    Usually, you'd use a "spinner".
    Basically, it's like the throbber design seen in Firefox, so it's a ring of dots that spins (one dot is lit up while the others are grey).
    You show this so that the user knows there's some activity and doesn't freak out (you could also use a loading message with this).

    With Prototype, something like:
    HTML Code:
    <a href="#" onclick="new Ajax.Updater('updater_div', 'returnthis.php', {asynchronous:true, evalScripts:true, onComplete:function(request){Element.hide('message');}, onLoading:function(request){Element.show('message')}}); return false;">LINK</a>
    I haven't toyed with these two as they were ripped from some Rails generated AJAX, but they seem to work for me.
    PHP, CSS, XHTML, Delphi, Ruby on Rails & more.
    Current project: CMS Object.
    Most recent change: Theme support is up and running... So long as I use my theme resource loaders instead of that in the Rails plug-in.
    Release date: NEVER!!!

  3. #3
    Member lionsgate's Avatar
    Join Date
    Nov 2006
    Location
    18/7 Online
    Posts
    106

    Default Re: AJAX Loading Message

    Does that script work? I think there is a error. I'll try myself then i'll let you know.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 11-17-2006, 10:40 AM
  2. Searching With Ajax
    By phpnut in forum Javascript
    Replies: 5
    Last Post: 11-06-2006, 07:56 AM
  3. Replies: 1
    Last Post: 10-12-2006, 12:53 AM
  4. AJAX and PHP
    By phpnut in forum PHP
    Replies: 4
    Last Post: 10-02-2006, 01:22 PM
  5. Replies: 0
    Last Post: 10-22-2005, 04:35 PM

Posting Permissions

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