Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for promptdemo.hta

(view source code of promptdemo.hta as plain text)

  1. <html>
  2. <head>
  3. <title>Prompt Demo</title>
  4. <HTA:APPLICATION
  5.   APPLICATIONNAME="Prompt Demo"
  6.   ID="PromptDemo"
  7.   VERSION="1.00"
  8.   BORDER="none"
  9.   CAPTION="no"
  10.   SYSMENU="no"
  11.   MAXIMIZEBUTTON="no"
  12.   MINIMIZEBUTTON="no"
  13.   SCROLL="no"
  14.   CONTEXTMENU="no"
  15.   SELECTION="no"/>
  16. </head>
  17.  
  18. <script language="VBScript">
  1. Function IsNullOrEmpty( myString )
  2. 	IsNullOrEmpty = False
  3. 	If IsNull( myString ) Then IsNullOrEmpty = True
  4. 	If myString = ""      Then IsNullOrEmpty = True
  5. End Function
  6.  
  7. Sub Window_OnLoad
  8. 	window.resizeTo 0, 0
  9. 	window.moveTo Int( ( window.screen.width - 498 ) / 2 ), Int( ( window.screen.height - 139 ) / 2 )
  10. 	window.document.title = PromptDemo.ID & " " & PromptDemo.Version
  11. 	confirmed = False
  12. 	While Not confirmed
  13. 		password = ""
  14. 		While IsNullOrEmpty( password )
  15. 			password = Trim( window.Prompt( "Enter your password:", "" ) )
  16. 		Wend
  17. 		confirmed = window.Confirm( "Please confirm that your password is """ & password & """" )
  18. 	Wend
  19. 	window.Alert "Confirmed password: """ & password & """"
  20. 	window.Close
  21. End Sub
  1. </script>
  2.  
  3. <body>
  4. </body>
  5. </html>

page last modified: 2024-04-16; loaded in 0.0090 seconds