p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   Sending parameters to a stand-along javascript (http://p2p.wrox.com/showthread.php?t=29143)

wmacomber May 10th, 2005 09:57 AM

Sending parameters to a stand-along javascript
 
[?]I have a stand-along javascript that I run on the client-side from a HTML page that simply installs a printer. However, since I control over 200 printers, I do not want to have a javascript for each printer. Therefore, is is possible to pass parameters (server name, printer, default printer flag) to a single generic script.


joefawcett May 11th, 2005 09:50 AM

Very easy if the script is being run by the Windows Script Host, as stand alone files are by default, it's very similar to using traditional batch files as regards passing the values. To retrieve them see the documentation here and look at WScript.arguments.
Windows Script Host

--

Joe (Microsoft MVP - XML)


All times are GMT -4. The time now is 05:19 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.