Solved

onreadystatechange javascript event and Ajax threading

Posted on 2009-04-03
6
431 Views
Last Modified: 2012-05-06
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
Comment
Question by:Abdu_Allah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 16

Accepted Solution

by:
sunithnair earned 500 total points
ID: 24058824
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
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24058918
No, I mean ASP.NET thread.
0
 
LVL 16

Expert Comment

by:sunithnair
ID: 24059030
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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24059468
Is'nt there workaround to delay the html page to render until the thread finishs it's job?
0
 
LVL 16

Expert Comment

by:sunithnair
ID: 24059649
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
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24060475
We use threading to improve the performance.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

630 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