Click here to Skip to main content
15,886,362 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: eval() Vs setTimeout() Pin
Ali Al Omairi(Abu AlHassan)15-May-11 3:44
professionalAli Al Omairi(Abu AlHassan)15-May-11 3:44 
GeneralRe: eval() Vs setTimeout() Pin
AspDotNetDev15-May-11 6:56
protectorAspDotNetDev15-May-11 6:56 
GeneralRe: eval() Vs setTimeout() Pin
Ali Al Omairi(Abu AlHassan)15-May-11 11:04
professionalAli Al Omairi(Abu AlHassan)15-May-11 11:04 
Questionjquery wait Pin
fififlowertot5-May-11 0:48
fififlowertot5-May-11 0:48 
AnswerRe: jquery wait Pin
Not Active5-May-11 2:21
mentorNot Active5-May-11 2:21 
QuestionWhy SetTimeout doesn't work inside object? Pin
Olli Ikonen2-May-11 11:19
Olli Ikonen2-May-11 11:19 
AnswerRe: Why SetTimeout doesn't work inside object? Pin
AspDotNetDev2-May-11 11:39
protectorAspDotNetDev2-May-11 11:39 
GeneralRe: Why SetTimeout doesn't work inside object? Pin
Olli Ikonen2-May-11 13:14
Olli Ikonen2-May-11 13:14 
I tried but it didn't worked...is the 'this' pointing window object rather than the object
i've created, if so do i have to move the timed animate to global or can i somehow other
way point it to window.setTimeout method?

I tried also use of closure attribute like setTimeout(function() { timedAnimate(); }, this.Interval),
but noo-ou-ou nothing happened.

i tried like this:

  doAnimate : function(value)
  { 
    if(this.Position == value)
    {
      return;
    }
    this.IncDecTotal = 0;
    this.ValTo = value;      
    this.IncDec = this.Step;
    if(this.Position > value)
    {
      this.IncDec = -this.Step;  
    }
		
		alert("this: " + this + " this.IncDec: " + this.IncDec);	
		
    this.Stop = false;
    this.timedAnimate();
  },
  timedAnimate : function()
  {	
    this.setPosition(this.Position + this.IncDec);
		
    if((this.IncDec < 0) && (this.Position <= this.ValTo))
    {
      clearTimeout(this.t);
      this.Stop = true;
    }
    else if((this.IncDec > 0) && (this.Position >= this.ValTo))
    {    
      clearTimeout(this.t);
      this.Stop = true;
    }
    else
    {
      this.t = setTimeout(timedAnimate, this.Interval);
    }
  },
</code>


Olli.
GeneralRe: Why SetTimeout doesn't work inside object? Pin
AspDotNetDev2-May-11 13:19
protectorAspDotNetDev2-May-11 13:19 
GeneralRe: Why SetTimeout doesn't work inside object? Pin
Olli Ikonen2-May-11 13:56
Olli Ikonen2-May-11 13:56 
Question[RESOLVED] Preserve the form status Pin
CodingLover1-May-11 20:28
CodingLover1-May-11 20:28 
AnswerRe: Preserve the form status Pin
Sunasara Imdadhusen5-May-11 3:55
professionalSunasara Imdadhusen5-May-11 3:55 
GeneralRe: Preserve the form status Pin
CodingLover5-May-11 17:58
CodingLover5-May-11 17:58 
QuestionHow can i refresh status bar information... Pin
Olli Ikonen29-Apr-11 23:42
Olli Ikonen29-Apr-11 23:42 
AnswerRe: How can i refresh status bar information... Pin
DaveAuld29-Apr-11 23:59
professionalDaveAuld29-Apr-11 23:59 
GeneralRe: How can i refresh status bar information... Pin
Olli Ikonen30-Apr-11 0:31
Olli Ikonen30-Apr-11 0:31 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 0:33
professionalDaveAuld30-Apr-11 0:33 
GeneralRe: How can i refresh status bar information... Pin
Olli Ikonen30-Apr-11 1:37
Olli Ikonen30-Apr-11 1:37 
GeneralRe: How can i refresh status bar information... Pin
Luc Pattyn30-Apr-11 2:26
sitebuilderLuc Pattyn30-Apr-11 2:26 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 4:05
professionalDaveAuld30-Apr-11 4:05 
GeneralRe: How can i refresh status bar information... Pin
Luc Pattyn30-Apr-11 4:48
sitebuilderLuc Pattyn30-Apr-11 4:48 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 4:51
professionalDaveAuld30-Apr-11 4:51 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 6:35
professionalDaveAuld30-Apr-11 6:35 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 5:32
professionalDaveAuld30-Apr-11 5:32 
QuestionWhat in a world i'm doing wrong... Pin
Olli Ikonen30-Apr-11 6:47
Olli Ikonen30-Apr-11 6:47 

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.