Hrm...not a bad idea. I'll look into that.

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kristinn Sigmundsson
Sent: Friday, April 06, 2007 4:24 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Stop pending AJAX processes?


hmm how about then making a single ajaxcall when opening a accordation menu
and splitting the returning result (using xml, json or whatever) and then
put it on the right place? That would make the request quite few and still
make the initial page load fast. 

//Kristinn




On 4/6/07, Andy Matthews <[EMAIL PROTECTED]> wrote: 

Dan...
 
The catch is that I'm not loading "all" of the info at once. It's
technically still an on demand process. The user is initiating it by opening
an accordion section. There's quite a lot of code coming back and the whole
enchilada might take longer than we would like. So I think this is a good
middle ground. It's more proof of concept anyway but I'm interested to see
how it might work.

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dan G. Switzer, II
Sent: Friday, April 06, 2007 9:41 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Stop pending AJAX processes?


Andy,

 

If you want all the information to just be there, then include it in the
original HTML and just hide it. The core benefit you gain by loading content
"on demand" is you only send the data that's necessary. If you ended up
doing a bunch of AJAX calls to load all the data, all you've done is made
the code harder to manage and inundated your server with a bunch of requests
instead of one single request (remember, each AJAX call is a separate HTTP
request-depending on your page and the number of users you could really
flood your server w/requests.)

 

Also, there is no way to "stop" a request once it's started. Once you
initiate the HTTP request, the server will start processing it. You can stop
listening for the result you get back from the server, but the server is
still going to attempt to complete the request.

 

-Dan

 

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Friday, April 06, 2007 9:56 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Stop pending AJAX processes?

 

First a small walk-through of what I've got now:

http://www.commadelimited.com/uploads/psychic
<http://www.commadelimited.com/uploads/psychic> 

 

Right now, if you click any of the black images, it triggers an AJAX call
which places it's response in a hidden div. That's easy enough and already
works. In an effort to make this work as speedily as possible, I'd like to
do following:

 

1) When ANY "session" first opens, every row that has more data (indicated
by the black image which has a class of "nav") should make it's associated
AJAX call and return it's information. I would like this to happen with no
action from the user.

 

2) If the user switches to a new accordion section, ideally I'd like to
cancel all pending AJAX calls, then trigger new calls for the current
accordion section.

 

So, that's my question...is this possible, and if so, how would I do it? The
thought is that the user will spend at least a few seconds looking at the
basic interface before clicking into any of the details. It would be awesome
if, when the user clicks any details image, that the data was already there
and the details would just slide open.

 

Anyone have any ideas how to accomplish this, if it's even possible?

____________________________________

 

Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249

[EMAIL PROTECTED]
www.dealerskins.com <http://www.dealerskins.com/> 

 


Attachment: image001.gif
Description: GIF image

Reply via email to