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
Category: Ajax | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 3851 | Hits: 248

Similar Posts

  • Common RadWindow issues and their solution more
  • A Lightweight Event Framework in JavaScript more
  • Kobe - Oh Dear Lord Why?! more
  • An Overview of Partial Classes and Partial Methods more
  • Outside my element: A CSS Trick more
  • Getting and Setting Query String Values in JavaScript more
  • jQuery Delete Link With Downlevel Support more
  • Background: Extension Methods, Silverlight & Linq more
  • Background: Extension Methods, Silverlight & Linq more
  • Back to Basics: Delegates, Anonymous Methods and Lambda Expressions 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