JavaScript window.SetTimeout to a JavaScript Class method or function with parameters?

Posted by: Rick Strahls WebLog, on 28 Mar 2006 | View original | Bookmarked: 0 time(s)

  Here's one I've been struggling with for a bit now. I need to make a setTimeout() call to a method or function inside of a class and pass a parameter. Say I'm in a method and inside of that method I need to fire a request to do delayed execution of another method in the same class.   Outside of classes you can do this:   if (Timeout && Timeout > 0)     window.setTimeout("HideToolTip('" + ControlId + "')",Timeout);   This works fine with plain global functions....

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Ajax | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 3979 | Hits: 254

Similar Posts

  • Introducing Versatile DataSources more
  • Entirely unobtrusive and imperative templates with Microsoft Ajax Library Preview 6 more
  • Getting and Setting Query String Values in JavaScript more
  • An Overview of Partial Classes and Partial Methods more
  • A Lightweight Event Framework in JavaScript more
  • Common RadWindow issues and their solution more
  • setInterval is (moderately) evil more
  • MAB ContainerModel / Funq: a transparent container more
  • Kobe - Oh Dear Lord Why?! more
  • Making extension methods amenable to mocking more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD