SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: pausing script

  1. #1
    SitePoint Enthusiast
    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?

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    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>
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •