0

1)test.vbs

Function demo()
  msgbox "Welcome to Follow Tutorials"
End Function

2)test1.html

    <meta http-equiv="x-ua-compatible" content="IE=10">
    <title>Follow Tutorials</title>
    <script type="text/vbscript" src="test.vbs"></script>
</head>
<body>
    <h2>Placement of VBScript in head section</h2>
    <input type="button" onclick="demo()" value="Follow Tutorials"/>
    <p>Click to see event </p>
</body>

Above is the code i am trying to run as a simple example .The function demo() is in separate file test.vbs which i want to call fro html page on click of button.

I am using IE11 and vbscript is not supported by IE11.So is there a way i can call a vbs file from javascript in html?

Please note if removed html tag in this post as it dint allow me to post the question

5
  • The real question is: "why would you even try to do this?". At this point in history, JS is so rich that trying to use VB for anything client side simply makes absolutely no sense Commented Apr 2, 2015 at 6:14
  • the real function that i want to do this is to open UFT and attach libraries with jus one click of a button in html. Commented Apr 2, 2015 at 8:20
  • Okay, but again: why? This is not what the browser is for these days, we finally got rid of being able to tie web behaviour to specific browsers and OSses, why are you trying to put it back in? Commented Apr 2, 2015 at 15:33
  • I just want to give a UI to start automation execution Commented Apr 2, 2015 at 16:29
  • But you already have a UI: the whole point of a browser is to give you interactive content. Just wire up things normally, with UI elements on your page calling JS functions that tell your server to start doing "whatever it needs to do". Commented Apr 2, 2015 at 16:45

1 Answer 1

1

IE11 is trying to remove support for VBScript so adding <script language="vbscript"> will not work. Looking at this question should help you figure out a workaround. Please post your workaround to your question if you come up with one.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.