Here now, how to pass the value to callback function for 'temp' variable? If I change this line 'request.onreadystatechange = updatePage;', browser throw 'type mismatch error'.
You cannot change what somebody else's code is going to pass to the callback function. You need to write your callback to adhere to the signature that the calling code will use.
In this case, the callback function is defined to accept the XMLHttpRequest instance. Normally, you could add your data as properties onto that object to "tag along" for the ride, but because IE6 implements it as an ActiveX object, you can't do this in this case.
Rather, use a closure:
[ November 24, 2006: Message edited by: Bear Bibeault ]