SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: pausing script
-
Sep 17, 2002, 12:47 #1
- Join Date
- Sep 2002
- Posts
- 28
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
pausing script
Can you pause the script. Like ask the user for data. I am trying to track down this bug? I just want to hit the space bar for example to continue?
-
Sep 17, 2002, 14:34 #2
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well, you can effectively pause the script for user input with alert(), confirm() or prompt(). Consider these examples
Code:<script> document.write("1"); document.write("2"); alert("Pause"); document.write("3"); document.write("4"); </script> <script> document.write("1"); document.write("2"); if (confirm("Continue")) { document.write("3"); document.write("4"); } </script>
Bookmarks