-
Scripting in ASP
Is it possible to mix VBscript and javascript/JScript in a single .asp file? Can someone point me to a simple and clear example or two, please. I have javascript functions I want to include/use in an .asp file that I would like to call from VBscript code in the same file. Thanks for any help. Info on the Internet is 10-12 years old. There must be newer information.
-
Scripting in ASP
In ACP's engine, it is not possible, sorry. What you can do, however, is make a Windows Script Component which wraps the stuff you want to do, then create and instance and call the methods and properties you define. Look at UserActionsTemplate.wsc not the JS one. ABSOLUTELY. CHANGES THE GUID TO SOMETHING UNIQUE IN YOUR NEW ONE. You should use a GUID generator. There are some online.
Sent from my iPad using Tapatalk HD (which does not support threading, sorry)
-
Thanks once again for your insight. This explains why I've been stymied with the "catalog view" script. I was trying to reuse your getFormSexa(), etc., javascripts in it. Microsoft purports to enable both in IIS, and I know ACP does not use IIS. I just assumed ACP's engine would be similar. I'll look into your suggestion. I also have another idea that will use a VBScript-only .asp approach.
-
Just to close this out, I was able to do this entirely in VBScript.
-
Look at most of my ASP pages. They are in JScript. The key is the declaration at the top, which tells the ACP ASP engine to load the JScript engine. What ACP will not do is allow both languages within the same ASP page.