Topic
  • 3 replies
  • Latest Post - ‏2014-09-20T11:26:40Z by jitupkp
BillN.
BillN.
1 Post

Pinned topic Interrupt Ajax Response

‏2011-11-16T15:04:52Z |
Greetings All.

I use Ajax constructs sporadically on my project, so I consider myself a novice. My situation is this: I am using Ajax within a web application to call a servlet for data/response. When my Ajax callback function is invoked, the first thing I want to do is to disable a button on my web page (using html button attribute 'disable). In my example, I have a huge response coming back from the servlet (an html table with over 10000 rows). I put the code in to disable the button (in the callback function) before setting the innerHtml of my div tag with the responseText. Unfortunately, the button does not get disabled (nor is any other alteration of the page doable) until the callback function is done rendering the contents of the responseText.

Question: is there a way to somehow 'interrupt' the callback function to disable the button? I assume that what is happening is that the Ajax/httpRequest takes control and needs to complete before control is given back to the browser? Any ideas would be greatly appreciated.
thanks,
Bill
Updated on 2011-12-01T02:46:39Z at 2011-12-01T02:46:39Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1140 Posts

    Re: Interrupt Ajax Response

    ‏2011-12-01T02:46:39Z  
    A button may be disabled in the callback function. Refer example in catalog form validation in which a Submit button is disabled in the callback function.
    http://www.oracle.com/technetwork/articles/vohra-ajax-084607.html
  • jitupkp
    jitupkp
    104 Posts

    Re: Interrupt Ajax Response

    ‏2014-09-20T11:26:27Z  

    see more

    http://techgurulab.com/course/ajax-quiz-online/

  • jitupkp
    jitupkp
    104 Posts

    Re: Interrupt Ajax Response

    ‏2014-09-20T11:26:40Z  
    A button may be disabled in the callback function. Refer example in catalog form validation in which a Submit button is disabled in the callback function.
    http://www.oracle.com/technetwork/articles/vohra-ajax-084607.html

    see more

    http://techgurulab.com/course/ajax-quiz-online/