Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 5th, 2007, 12:59 PM
Authorized User
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default setTimeOut with a zero parameter?

I can't find documentation on what it does when I pass 0 as the second parameter to setTimeOut. Does anyone know? Does it mean no delay, or delay until the line before it finishes execution?

e.g. setTimeOut("callThisFunction()", 0)

Thanks
CC

 
Old April 5th, 2007, 02:18 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

ummm are you talking about the javascript function setTimeout?

if that is the case the signature looks like this:
setTimeout([code to execute], [milliseconds], [lang])

Code to execute is the code that you want to call after x amount of time. Required field.
milliseconds is how long the script should wait before executing the first parameter. Required field.
Lang is optional but can be JScript, VBScript, JavaScript.



================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old April 5th, 2007, 03:10 PM
Authorized User
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dparsons
I was actually referring to the DHTML function, as in
http://msdn.microsoft.com/library/de...setTimeout.asp

Think it's probably the same as javascript. I wasn't asking about the syntax, but the documentation didnt' mention its behavior if the time parameter is 0. That's the part I'm missing.

Thanks

 
Old April 5th, 2007, 08:44 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I have never used it. What happens when you set it to 0? I would assume that the code is executed immeadately.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
getting a return value from setTimeout() peirix Javascript 9 November 28th, 2008 06:22 PM
setTimeout second to Minute mateenmohd Javascript 6 November 28th, 2004 02:12 AM
Implementing setTimeout causing problems sherbir Javascript 1 August 12th, 2004 09:47 AM
Using setTimeout PortGuy Javascript 7 March 25th, 2004 02:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.