Solved

onreadystatechange javascript event and Ajax threading

Posted on 2009-04-03
6
386 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
  • 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

747 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

11 Experts available now in Live!

Get 1:1 Help Now