How to Make a Timer in Dreamweaver

The Adobe Dreamweaver software helps new webmasters create website code using a friendly user interface. The interface includes a JavaScript inclusion wizard you use to include a timer in your Dreamweaver app. A timer lets you countdown from a specific number of seconds, and send a user a message or redirect to a new location. You perform this action using the JavaScript "setTimeout" function.

Instructions

    • 1

      Open the Adobe Dreamweaver software from the Windows program menu. Open your Web project to load all website files in the Dreamweaver work space.

    • 2

      Double-click the Web page you want to use to create the timer. Click the "Insert" menu item and select "HTML." Click "Script Objects," then click "Script" to open a new JavaScript window.

    • 3

      Type the following code in the "Content" text box:

      window.setTimeout(functionToRun,time);

      Replace "functionToRun" with the function you want to run when the time runs down. Replace "time" with the time in milliseconds for the timer. For instance, if you want to count down from 5 seconds type "5000" as the "time" parameter.

    • 4

      Select "JavaScript" from the language drop-down and click "OK" to insert the code. Click "Save" to save the new file changes.

Related Searches:

References

Comments

Related Ads

Featured