Click here to Skip to main content
15,909,440 members
Home / Discussions / Web Development
   

Web Development

 
QuestionCryptImportKey Pin
Machma27-Apr-06 4:28
Machma27-Apr-06 4:28 
AnswerRe: CryptImportKey Pin
Paddy Boyd28-Apr-06 1:14
Paddy Boyd28-Apr-06 1:14 
QuestionCheck Size of Uploaded File Pin
thainam26-Apr-06 21:57
thainam26-Apr-06 21:57 
AnswerRe: Check Size of Uploaded File Pin
Guffa26-Apr-06 22:38
Guffa26-Apr-06 22:38 
QuestionI want to change internet options Pin
shortwave26-Apr-06 5:13
shortwave26-Apr-06 5:13 
AnswerRe: I want to change internet options Pin
Shog926-Apr-06 19:43
sitebuilderShog926-Apr-06 19:43 
QuestionJavascript OOP Pin
CoolASL26-Apr-06 2:02
CoolASL26-Apr-06 2:02 
AnswerRe: Javascript OOP Pin
Shog926-Apr-06 19:37
sitebuilderShog926-Apr-06 19:37 
Since you didn't post code, i'm going to guess at it:
var wrapper = 
{
	onloading : loadingfunc,
	onloaded : loadedfunc,
	oninteractive : interactivefunc,
	oncomplete : completefunc,
	onstatechange : MonitorStateChange
};

// ... create request object
req.onreadystatechange = wrapper.onstatechange;
// ... do something with the request object
The problem line is the assignment - no context is kept, so when MonitorStateChange() is finally called, this != wrapper. The solution? How about this:
req.onreadystatechange = function() { wrapper.onstatechange(); };

If i'm way off, post the actual code in question. Good luck!


Now taking suggestions for the next release of CPhog...

GeneralRe: Javascript OOP Pin
CoolASL28-Apr-06 4:57
CoolASL28-Apr-06 4:57 
QuestionPankaj Pin
rizwan.afsar25-Apr-06 21:52
rizwan.afsar25-Apr-06 21:52 
GeneralRe: Pankaj Pin
Guffa25-Apr-06 22:34
Guffa25-Apr-06 22:34 
GeneralRe: Pankaj Pin
Vasudevan Deepak Kumar26-Apr-06 18:32
Vasudevan Deepak Kumar26-Apr-06 18:32 
GeneralRe: Pankaj Pin
Sushant_Mathur26-Apr-06 23:30
Sushant_Mathur26-Apr-06 23:30 
GeneralRe: Pankaj Pin
rizwan.afsar27-Apr-06 0:05
rizwan.afsar27-Apr-06 0:05 
GeneralRe: Pankaj Pin
rizwan.afsar27-Apr-06 0:14
rizwan.afsar27-Apr-06 0:14 
GeneralRe: Pankaj Pin
Guffa27-Apr-06 0:46
Guffa27-Apr-06 0:46 
GeneralRe: Pankaj Pin
Sushant_Mathur27-Apr-06 1:11
Sushant_Mathur27-Apr-06 1:11 
GeneralRe: Pankaj Pin
Vasudevan Deepak Kumar27-Apr-06 19:52
Vasudevan Deepak Kumar27-Apr-06 19:52 
QuestionASP page always displays Old File content. Pin
BlrBoy25-Apr-06 20:15
BlrBoy25-Apr-06 20:15 
AnswerRe: ASP page always displays Old File content. Pin
Guffa25-Apr-06 20:44
Guffa25-Apr-06 20:44 
AnswerRe: ASP page always displays Old File content. Pin
alexey N25-Apr-06 22:36
alexey N25-Apr-06 22:36 
GeneralRe: ASP page always displays Old File content. Pin
BlrBoy26-Apr-06 0:31
BlrBoy26-Apr-06 0:31 
GeneralRe: ASP page always displays Old File content. Pin
alexey N26-Apr-06 0:42
alexey N26-Apr-06 0:42 
GeneralRe: ASP page always displays Old File content. Pin
BlrBoy26-Apr-06 1:05
BlrBoy26-Apr-06 1:05 
GeneralRe: ASP page always displays Old File content. Pin
alexey N26-Apr-06 17:38
alexey N26-Apr-06 17:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.