Click here to Skip to main content
15,894,410 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionXML and Javascript Pin
Member 820418431-Aug-11 19:26
Member 820418431-Aug-11 19:26 
QuestionRe: XML and Javascript Pin
DaveAuld31-Aug-11 22:43
professionalDaveAuld31-Aug-11 22:43 
AnswerRe: XML and Javascript Pin
Evan Gallup3-Sep-11 19:39
Evan Gallup3-Sep-11 19:39 
Questioniphone style switch Pin
AndyInUK30-Aug-11 23:07
AndyInUK30-Aug-11 23:07 
AnswerRe: iphone style switch Pin
AndyInUK2-Sep-11 1:06
AndyInUK2-Sep-11 1:06 
QuestionJavaScript class problem [modified] Pin
Wjousts25-Aug-11 6:09
Wjousts25-Aug-11 6:09 
AnswerRe: JavaScript class problem Pin
Graham Breach25-Aug-11 6:34
Graham Breach25-Aug-11 6:34 
GeneralRe: JavaScript class problem Pin
Wjousts25-Aug-11 7:40
Wjousts25-Aug-11 7:40 
Actually, that was a typo on my part when posting. I think the actual problem I'm having is more complicated that my simple example showed. The way StartTimer get called is from the callback to a jQuery getJSON:

JavaScript
MyClass.prototype.MyFunction = function () {
    $.getJSON(this.url + "/MyFunction?callback=?", function (data) {
        MyClass.prototype.ErrorChecker(data, function (data) {
            MyClass.prototype.StartTimer();
        });
    });
}


ErrorChecker is a function I use to check for a particular returned value that indicates an error occurred with my web service which then calls the passed in function (i.e. StartTimer) if there is no error. I thought the problem might be because I did MyClass.prototype, but changing it for this.StartTimer() (and/or this.ErrorChecker) doesn't work either and causes an error within jQuery. I guess somewhere within the callback infrastructure you lose the identity of "this". I guess I could change so that both methods (ErrorChecker and StartTimer) accept an extra argument which I can pass "this" in to. I'll give it a try.
AnswerRe: JavaScript class problem Pin
AspDotNetDev25-Aug-11 7:45
protectorAspDotNetDev25-Aug-11 7:45 
GeneralRe: JavaScript class problem Pin
Wjousts25-Aug-11 8:06
Wjousts25-Aug-11 8:06 
GeneralRe: JavaScript class problem Pin
AspDotNetDev25-Aug-11 8:11
protectorAspDotNetDev25-Aug-11 8:11 
GeneralRe: JavaScript class problem Pin
Wjousts25-Aug-11 8:18
Wjousts25-Aug-11 8:18 
AnswerRe: JavaScript class problem Pin
AspDotNetDev25-Aug-11 7:19
protectorAspDotNetDev25-Aug-11 7:19 
GeneralRe: JavaScript class problem Pin
Wjousts25-Aug-11 7:43
Wjousts25-Aug-11 7:43 
AnswerRe: JavaScript class problem Pin
AspDotNetDev25-Aug-11 7:47
protectorAspDotNetDev25-Aug-11 7:47 
GeneralRe: JavaScript class problem Pin
Wjousts25-Aug-11 7:58
Wjousts25-Aug-11 7:58 
Questionjquery dialog autosize [modified] Pin
fififlowertot24-Aug-11 3:05
fififlowertot24-Aug-11 3:05 
AnswerRe: jquery dialog autosize Pin
Gerben Jongerius24-Aug-11 19:50
Gerben Jongerius24-Aug-11 19:50 
QuestionPassing on Javascript array data to a PHP-array Pin
Gert Koetsier18-Aug-11 6:19
Gert Koetsier18-Aug-11 6:19 
AnswerRe: Passing on Javascript array data to a PHP-array Pin
Evan Gallup3-Sep-11 18:49
Evan Gallup3-Sep-11 18:49 
QuestionJavascript data (array) pass on to PHP Pin
Gert Koetsier18-Aug-11 6:15
Gert Koetsier18-Aug-11 6:15 
Questiondynamic progress bar with respect to time Pin
amjadali25516-Aug-11 18:27
amjadali25516-Aug-11 18:27 
AnswerRe: dynamic progress bar with respect to time Pin
Richard MacCutchan16-Aug-11 22:39
mveRichard MacCutchan16-Aug-11 22:39 
QuestionValidation groups with jQuery validation plugin on ASP.NET webforms? Pin
zeego14-Aug-11 19:32
zeego14-Aug-11 19:32 
AnswerCROSS POST Pin
Not Active14-Aug-11 19:40
mentorNot Active14-Aug-11 19:40 

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.