Javascript unable to call server-side function while another server-side is running.


We have a webform with a javascript function that does a call back to a server function (via Intersoft's WebGrid) every x seconds.  This all works fine.

We also have a button on the webform that when clicked runs a long server-side function.

The problem is that when the button click server-side function is clicked the other timer initiated "call back" server side function is no longer fired.  The Javascript function is still quite happily calling it but it no longer gets fired until the button click server-side function has completed.

Is there any way to allow the button-click server-side function to yield allowing the other server-side function to run so they both are executing simultaneously (or as close to it).  I guess im looking for an application.processmessage type command that allows other messages to be handled.


Who is Participating?
b1xml2Connect With a Mentor Commented:
requires MSIE.

Firefox also has support for this. The calls can be made to a page which accepts and returns xml as the delivery protocol.

If you stick with MSIE 5.5+ you can use web service behaviours for interaction between client and server.
you could use client-server communications with XmlHttp object which allows for the client to communicate with the server without reloading the page. It can re-use the same session object for authentication purposes. It can also be asynchronous which will not lock up the window.

JAMESAuthor Commented:
Is there no simpler way of doing this?
I highly doubt it
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.