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

Posted by: Rick Strahls WebLog, on 28 Mar 2006 | View original

  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
The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.

Similar Posts

  • Functional Programming via Anonymous Delegates and Script# more
  • The power of generics compells you, the power of generics compells you... more
  • Programming Visual CSharp 2005 more
  • Getting MAX with XSLT more
  • Ajax.NET Professional 6.6.2.2 with new Converters more
  • Mix06 demo part 2: building the accordion control more
  • IKVM 0.28 rc1 more
  • Automating Complex JavaScript-rich Controls with Watir more
  • Moving HTML objects using drag and drop around, CSS and JavaScript more
  • Stop The Window.Onload Madness more

News Categories

.NET | ADO.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Community Server | dasBlog | 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