/    Sign up×
Community /Pin to ProfileBookmark

Launch .vbs script whithin javascript

Hello,
I have an asp page and was wanting to be able to launch a .vbs script from it. Can I do this with javascript? If so, what would the code be?

Currently I have an input box in Javascript. So if the user enters in ‘yes’ then I would like it to run the .vbs script.

Thanks!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Warren86Nov 15.2004 — <HTML>

<Head>

<Script Language=JavaScript>

function testField(isForm){

testTxt = isForm.isTxt.value.toLowerCase();
if (testTxt == 'yes'){isYes()}
}

</Script>

<Script Language=VBScript>

Function isYes()

MsgBox "The user input the word Yes"

End Function

</Script>

</Head>

<Body>

<Form name='Form1'>

Something: <input type=text value="" name='isTxt' size=5>

</Form>

<input type=button value='Check It' onclick="testField(Form1)">

</Body>

</HTML>
Copy linkTweet thisAlerts:
@senshiNov 15.2004 — Be aware though that javascript and VBscript although they may appear to run together, they actually run as seperate interpreters, they dont converse with each other, in other words tou cant set a variable in VB script and expect javascript to read it, just wont happen, you have a special array procedure if you need to pass data between JScript and VBscript. So becareful what your doing with your data.
×

Success!

Help @zeus16 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...