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

Posted on 2005-05-06
Last Modified: 2008-01-09

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.


Question by:JAMES
    LVL 23

    Expert Comment

    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.

    LVL 23

    Accepted Solution

    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.

    Author Comment

    Is there no simpler way of doing this?
    LVL 23

    Expert Comment

    I highly doubt it

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now