Http web server - 285Chapter 16 .Window and Frame Objects the strings
Friday, January 4th, 2008285Chapter 16 .Window and Frame Objects the strings via string concatenation. For example, if a function uses event handling to find the element that a user clicked (to initiate some animation sequence), that element s ID, referenced by a variable, can be passed to the function invoked by setInterval(): function findAndCycle() { var elemID // statements here that examine the event info // and extract the ID of the clicked element, // assigning that ID to the elemID variable intervalID = setInterval( cycleAnimation( + elemID + ) , 500) } If you need to pass ever-changing parameters with each invocation of the function from setInterval(), look instead to using setTimeout()at the end of a function to invoke that very same function again. On the CD-ROM Example (with Listings 16-36 and 16-37) on the CD-ROM Related Items: window.clearInterval(), window.setTimeout() methods. setTimeout( expr , msecDelay [, language]) setTimeout(functionRef, msecDelay [, funcarg1, …, funcargn]) Returns: ID value for use with window.clearTimeout() method. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . . The name of this method may be misleading, especially if you have done other kinds of programming involving timeouts. In JavaScript, a timeout is an amount of time (in milliseconds) before a stated expression evaluates. A timeout is not a wait or script delay, but rather a way to tell JavaScript to hold off executing a statement or function for a desired amount of time. Other statements following the one containing setTimeout()execute immediately. Say that you have a Web page designed to enable users to interact with a variety of buttons or fields within a time limit (this is a Web page running at a free-standing kiosk). You can turn on the timeout of the window so that if no interaction occurs with specific buttons or fields lower in the document after, say, two minutes (120,000 milliseconds), the window reverts to the top of the document or to a help screen. To tell the window to switch off the timeout after a user does navigate within the allotted time, you need to have any button that the user interacts with call the other side of a setTimeout() method the clearTimeout() method to cancel the current timer. (The clearTimeout() method is explained earlier in this windowObject.setTimeout()
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.