Click here to Skip to main content
15,884,388 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Provide Name to Intranet Pin
Bradml11-Feb-07 20:28
Bradml11-Feb-07 20:28 
GeneralRe: Provide Name to Intranet Pin
suveenmohan11-Feb-07 21:10
suveenmohan11-Feb-07 21:10 
GeneralRe: Provide Name to Intranet Pin
Bradml11-Feb-07 21:12
Bradml11-Feb-07 21:12 
GeneralRe: Provide Name to Intranet Pin
Bradml10-Feb-07 0:53
Bradml10-Feb-07 0:53 
QuestionProvide Name to Intranet Pin
suveenmohan9-Feb-07 0:58
suveenmohan9-Feb-07 0:58 
QuestionRe: Provide Name to Intranet Pin
badgrs9-Feb-07 3:13
badgrs9-Feb-07 3:13 
AnswerRe: Provide Name to Intranet Pin
suveenmohan11-Feb-07 20:23
suveenmohan11-Feb-07 20:23 
QuestionJavascript class and setTimeout function Pin
User 98858-Feb-07 20:53
User 98858-Feb-07 20:53 
I defined a class like this

function slideshow()
{
    // member variables here

    // member function
    this.display_slide = display_slide;
}

function display_slide()
{
    // logic to display the next slide
    
    // To wait for 5 seconds and then call display_slide again
    setTimeout(this.display_slide, 5000);   

}


The problem is that this no longer refers to the slideshow object, but to the window object when the callback is made. Hence none of the code works the second time. The first time it works because it is directly invoked in the body onload event.

Is there a way to use setTimeout such that the function display_slide is called back in the correct context?

Thomas

modified 29-Aug-18 21:01pm.

AnswerRe: Javascript class and setTimeout function Pin
Bradml9-Feb-07 2:48
Bradml9-Feb-07 2:48 
GeneralRe: Javascript class and setTimeout function Pin
User 98859-Feb-07 5:06
User 98859-Feb-07 5:06 
Questionvisual studio 2005 Pin
Member 36991928-Feb-07 18:22
Member 36991928-Feb-07 18:22 
AnswerRe: visual studio 2005 Pin
kubben9-Feb-07 7:12
kubben9-Feb-07 7:12 
QuestionEncrypt URL to prevent parameter tampering attacks [modified] Pin
SindyatIndy8-Feb-07 7:24
SindyatIndy8-Feb-07 7:24 
AnswerRe: Encrypt URL to prevent parameter tampering attacks Pin
User 98858-Feb-07 21:24
User 98858-Feb-07 21:24 
AnswerRe: Encrypt URL to prevent parameter tampering attacks Pin
User 98858-Feb-07 21:28
User 98858-Feb-07 21:28 
AnswerRe: Encrypt URL to prevent parameter tampering attacks Pin
badgrs8-Feb-07 23:05
badgrs8-Feb-07 23:05 
AnswerRe: Encrypt URL to prevent parameter tampering attacks Pin
Bradml9-Feb-07 2:47
Bradml9-Feb-07 2:47 
GeneralRe: Encrypt URL to prevent parameter tampering attacks Pin
SindyatIndy9-Feb-07 4:19
SindyatIndy9-Feb-07 4:19 
QuestionError Opening project Pin
No-e8-Feb-07 7:17
No-e8-Feb-07 7:17 
AnswerRe: Error Opening project Pin
Sandeep Akhare8-Feb-07 23:52
Sandeep Akhare8-Feb-07 23:52 
Questionjavascrpt drop down blank Pin
spinanicky8-Feb-07 3:56
spinanicky8-Feb-07 3:56 
QuestionJavascript : Moving objects Pin
SoftDeveloper8-Feb-07 3:48
SoftDeveloper8-Feb-07 3:48 
QuestionWeb.Config Security settings. Pin
BLOEDHOND8-Feb-07 1:51
BLOEDHOND8-Feb-07 1:51 
AnswerRe: Web.Config Security settings. Pin
Sandeep Akhare8-Feb-07 3:55
Sandeep Akhare8-Feb-07 3:55 
Questionscrollbar using Pin
Shital@icon7-Feb-07 22:45
Shital@icon7-Feb-07 22:45 

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.