Solved

onreadystatechange javascript event and Ajax threading

Posted on 2009-04-03
6
395 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Angular JS Route 3 52
Receiving a string from a WebService Push 21 37
Add css and js to MVC Project not in project 9 27
jquery conditionally populate list boxes 2 24
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-…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

910 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

16 Experts available now in Live!

Get 1:1 Help Now