"James Black" <planiturthian@gmail.com> writes:
[color=blue]
> I have an object, and I define the following:
> var processForm=new Object();[/color]
No need to assign an object to the variable when you overwrite
it immediatly afterwards:
[color=blue]
> processForm=function(inservleturl) {
> this.inservleturl = inservleturl;
> this.submitForm();
> }
>
> processForm.prototype.submitForm2=function() {[/color]
Should this have been "submitStep2"?
[color=blue]
> }
>
> processForm.prototype.submitForm=function() {
> setTimeout("submitStep2()", 20);[/color]
WHen the first argument to setTimeout is a string, then it
is parsed and executed as a program in the global context.
Even if it wasn't, "submitStep2" is not a variable in
any scope.
[color=blue]
> How can the submitForm function's setTimeout call submitStep2?[/color]
Try:
var self = this;
setTimeout(function(){self.submitStep2();}, 20);
/L
--
Lasse Reichstein Nielsen -
lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'