From: Brian Cryer on
I'm making considerable use of auto-postback and the page is responsive so
this works fine. I have found though there were I have a number of check
boxes even a 1 second postback "turn-around" can be annoying because it
gives me time to click on a second check box before the page has been
refreshed which means that I loose the effect of that second click. I know
the traditional approach would be to use a separate submit button and
abandon auto-postback, but I'd rather not do this because the only place I
can introduce a submit button would necessitate the user scrolling.

Page design and layout issues aside, is there any (easy) way to delay an
auto-postback so its say 1 second after the last click or key-press?

Thanks.
--
Brian Cryer
http://www.cryer.co.uk/brian

From: Harv on
On Jul 15, 4:59 am, "Brian Cryer" <not.here(a)localhost> wrote:
> I'm making considerable use of auto-postback and the page is responsive so
> this works fine. I have found though there were I have a number of check
> boxes even a 1 second postback "turn-around" can be annoying because it
> gives me time to click on a second check box before the page has been
> refreshed which means that I loose the effect of that second click. I know
> the traditional approach would be to use a separate submit button and
> abandon auto-postback, but I'd rather not do this because the only place I
> can introduce a submit button would necessitate the user scrolling.
>
> Page design and layout issues aside, is there any (easy) way to delay an
> auto-postback so its say 1 second after the last click or key-press?
>
> Thanks.
> --
>  Brian Cryer
>  http://www.cryer.co.uk/brian

Can you explain a little more on why you would want to delay a
postback? What are you doing in the event handler of the checkbox? Are
you displaying more information to the user upon return? If you might
clarify what you are doing we might be able to assist in the "design"
and offer other solutions...
From: Brian Cryer on
"Harv" <harveymw(a)gmail.com> wrote in message
news:e83bd6a6-48e5-4840-a7dc-cb5d3f5fc5c7(a)k19g2000yqc.googlegroups.com...
> On Jul 15, 4:59 am, "Brian Cryer" <not.here(a)localhost> wrote:
> > I'm making considerable use of auto-postback and the page is responsive
> > so
> > this works fine. I have found though there were I have a number of check
> > boxes even a 1 second postback "turn-around" can be annoying because it
> > gives me time to click on a second check box before the page has been
> > refreshed which means that I loose the effect of that second click. I
> > know
> > the traditional approach would be to use a separate submit button and
> > abandon auto-postback, but I'd rather not do this because the only place
> > I
> > can introduce a submit button would necessitate the user scrolling.
> >
> > Page design and layout issues aside, is there any (easy) way to delay an
> > auto-postback so its say 1 second after the last click or key-press?
> >
> > Thanks.
> > --
> > Brian Cryer
> > http://www.cryer.co.uk/brian
>
> Can you explain a little more on why you would want to delay a
> postback? What are you doing in the event handler of the checkbox? Are
> you displaying more information to the user upon return? If you might
> clarify what you are doing we might be able to assist in the "design"
> and offer other solutions...

I have a set of check boxes (not many, but anywhere between 4 and possibly
16), each of which change some aspect of reported information shown in a
table and I regenerate/redisplay the table after each checkbox change. If a
user is quick in clicking the check boxes then they can check 2 or 3
checkboxes before the page has refreshed which means that it looks like of
the (say) 3 they had checked only 1 has stuck and the other two have reset.
(All done within an ajax panel, so I'm not updating the entire page.)

I know the traditional approach is to stick a [submit] button on the page,
and I do that if JavaScript (and thus auto-postback) is disabled. But for
most people (who only click once or twice or do it more slowly) the current
approach works fine.

Like I said in my original post, page design and layout issues aside, is
there any (easy) way to delay an auto-postback so its say 1 second after the
last click or key-press? I suppose the answer is no ... or perhaps I should
look at the javascript postback logic provided by the framework and see if I
could replace that by introducing a small timer ... although even if I do
that I suppose I'm just moving the point at which it becomes a problem, so
maybe what I'm after isn't an answer after all ... so thoughts welcome.
--
Brian Cryer
http://www.cryer.co.uk/brian



From: Harv on
On Jul 22, 2:47 am, "Brian Cryer" <not.here(a)localhost> wrote:
> "Harv" <harve...(a)gmail.com> wrote in message
>
> news:e83bd6a6-48e5-4840-a7dc-cb5d3f5fc5c7(a)k19g2000yqc.googlegroups.com...
>
>
>
> > On Jul 15, 4:59 am, "Brian Cryer" <not.here(a)localhost> wrote:
> > > I'm making considerable use of auto-postback and the page is responsive
> > > so
> > > this works fine. I have found though there were I have a number of check
> > > boxes even a 1 second postback "turn-around" can be annoying because it
> > > gives me time to click on a second check box before the page has been
> > > refreshed which means that I loose the effect of that second click. I
> > > know
> > > the traditional approach would be to use a separate submit button and
> > > abandon auto-postback, but I'd rather not do this because the only place
> > > I
> > > can introduce a submit button would necessitate the user scrolling.
>
> > > Page design and layout issues aside, is there any (easy) way to delay an
> > > auto-postback so its say 1 second after the last click or key-press?
>
> > > Thanks.
> > > --
> > > Brian Cryer
> > >http://www.cryer.co.uk/brian
>
> > Can you explain a little more on why you would want to delay a
> > postback? What are you doing in the event handler of the checkbox? Are
> > you displaying more information to the user upon return? If you might
> > clarify what you are doing we might be able to assist in the "design"
> > and offer other solutions...
>
> I have a set of check boxes (not many, but anywhere between 4 and possibly
> 16), each of which change some aspect of reported information shown in a
> table and I regenerate/redisplay the table after each checkbox change. If a
> user is quick in clicking the check boxes then they can check 2 or 3
> checkboxes before the page has refreshed which means that it looks like of
> the (say) 3 they had checked only 1 has stuck and the other two have reset.
> (All done within an ajax panel, so I'm not updating the entire page.)
>
> I know the traditional approach is to stick a [submit] button on the page,
> and I do that if JavaScript (and thus auto-postback) is disabled. But for
> most people (who only click once or twice or do it more slowly) the current
> approach works fine.
>
> Like I said in my original post, page design and layout issues aside, is
> there any (easy) way to delay an auto-postback so its say 1 second after the
> last click or key-press? I suppose the answer is no ... or perhaps I should
> look at the javascript postback logic provided by the framework and see if I
> could replace that by introducing a small timer ... although even if I do
> that I suppose I'm just moving the point at which it becomes a problem, so
> maybe what I'm after isn't an answer after all ... so thoughts welcome.
> --
>  Brian Cryer
>  http://www.cryer.co.uk/brian

Brian,

I have done similar work on a survey so I understand your pain. There
might be a couple of options available:

1 - UpdateProgress to "lock" the page until the postback finishes.

2 - Utilize some javascript to disable controls on the page. This
might help if you want this route:
http://dotnetslackers.com/community/blogs/haissam/archive/2007/08/30/Display-_2200_Loading_2200_-And-Disable-a-button-after-click-event-_5B002E00_AJAX_5D00_.aspx.
If course you would probably have to disable all the checkbox controls
at once or maybe put them all in a single Panel and just enable/
disable that.

3 - Create a single control (ascx) with an update panel containing one
of the checkbox controls and allow that object to handle it's own
events per checkbox. Of course this means you create a control for
each checkbox you are displaying but at least each control can handle
the event individually and display additional information within
itself.

We ended up using #3 in the survey. It allowed each control to do its
own processing and allowed the user to check a box and move on. We
also added an update progress showing the user we are doing something
with that response they provided... this actually helped a lot as the
user understands the page is "doing" something.

Attempting to "head off" the postback and make it wait isn't a good
idea. You should be able to write controls that can respond
individually through some type of asynchronous operations or force the
user to wait for the process to finish before moving on. Of course the
latter will not be acceptable to users as they never want to wait. =).
I would look into the asynchronous triggers of the update panel of
each individual control and see if that helps the user click as fast
as they want and allows your data to load based on server load or
response time.

Anyway... not sure any of this helps but maybe sparked a solution for
you.

Mark