• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 437
  • Last Modified:

onreadystatechange javascript event and Ajax threading

Hi, in the regular cases the onreadystatechange event fired when Ajax request for a page x has been done , but in our case we want to use threading in that page  ( page x) but in this case onreadystatechange event fires when that page(page x) has finished executing not when the thread in that page has finished, so how we can fire onreadystatechange when the thread has finished not the page.
Help please.
0
Abdu_Allah
Asked:
Abdu_Allah
  • 3
  • 3
1 Solution
 
sunithnairCommented:
What do you mean by thread? Is that ASP.NET thread you mean or just Javascript using setTimeOut or something like that? I am afraid you will not be able to do both of that I suppose because onreadystate change is fired when the whole of HTML has been rendered (same like when the browsers show "Done" message in the status bar.)
0
 
Abdu_AllahAuthor Commented:
No, I mean ASP.NET thread.
0
 
sunithnairCommented:
You will not be able to do that anyway as I said before. Check this link if you need more info on onreadystatechange http://www.w3schools.com/ajax/ajax_xmlhttprequest.asp
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Abdu_AllahAuthor Commented:
Is'nt there workaround to delay the html page to render until the thread finishs it's job?
0
 
sunithnairCommented:
That is the real purpose of threading to have the page processed when something else is processed in the background. Why are you using the Thread for? If you remove the threading the page will process as your requirement.
0
 
Abdu_AllahAuthor Commented:
We use threading to improve the performance.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now