prompt for JavaScript for WSHShell 
Author Message
 prompt for JavaScript for WSHShell

Newsgroupies

If I used JavaScript client-side in a Web browser, I could call 'prompt' to
request a string of the user.

But if I use it inside WSH, it has no 'prompt' feature.

WSHShell supports a 'Popup', but it does not seem to have a GetString or
Prompt feature.

How do I do this simple thing?

--
  Phlip
======= http://www.*-*-*.com/ ~tegan/home.html =======



Mon, 27 Jan 2003 03:00:00 GMT  
 prompt for JavaScript for WSHShell
Use the .wsf file format and write a wrapper for the VBScript InputBox...

<job>
<script language="VBscript">
function prompt(sPrompt,sTitle,sDefault)
  prompt = inputbox(sPrompt,sTitle,sDefault)
end function
</script>
<script language="Jscript">
  WScript.echo(prompt("my prompt","my title","my default"));
</script>
</job>

Or do the same thing packaged as a WSC...

--
Michael Harris
Microsoft MVP - Scripting

Quote:

> Newsgroupies

> If I used JavaScript client-side in a Web browser, I could call 'prompt' to
> request a string of the user.

> But if I use it inside WSH, it has no 'prompt' feature.

> WSHShell supports a 'Popup', but it does not seem to have a GetString or
> Prompt feature.

> How do I do this simple thing?

> --
>   Phlip
> ======= http://users.deltanet.com/~tegan/home.html =======



Mon, 27 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. prompt for JavaScript for WSHShell

2. Proffesional Help Needed: Unwanted Security Prompt W/ WshShell.run from local html

3. WshShell.Exec without command prompt window?

4. javascript prompt

5. javascript prompt function

6. javascript prompt

7. environment variables: wshshell.environment or wshshell.expandenv ironmentstrings?

8. WshShell.Run vs WshShell.Exec

9. runas with WshShell.Exec versus WshShell.Run

10. Prompt on window close...

11. Running a local bat file without the download dialog box prompt

12. disable activex prompts?!?

 

 
Powered by phpBB® Forum Software