Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2005, 09:57 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

 
Old May 11th, 2005, 09:50 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Does the p stand for php or perl ciderpunx BOOK: Professional LAMP ISBN: 0-7645-9723-X 2 October 27th, 2011 02:06 PM
Passing Parameters in html/javascript js_newbie Javascript 2 February 17th, 2007 08:44 PM
Problems passing xsl parameters from javascript mxxz XSLT 4 November 3rd, 2006 11:21 AM
Sending over a sorting parameters segeller Crystal Reports 4 September 4th, 2005 07:58 PM
creating stand alone exe mr_bharathi General .NET 3 November 30th, 2004 08:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.