Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Virgil, NY
    Posts
    4,556

    Default 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.
    Last edited by Dick Berg; Sep 22, 2012 at 01:06.
    Dick
    www.VirgilObservatory.us
    Pier-mounted Meade 12-inch SCT "classic"
    w. focal reducer to f/5.3 ~ FL 1630mm
    Optec TCF-S focuser
    SBIG CFW-8A and ST7-XME
    FOV ~ 15' x 10'
    H-alpha, BVRI, RGB & Clear filters
    MaxIm and, of course, ACP!
    AAVSO Code: BRIC

  2. #2
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    25,833

    Default 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)
    -- Bob

  3. #3
    Join Date
    Nov 2005
    Location
    Virgil, NY
    Posts
    4,556

    Default

    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.
    Dick
    www.VirgilObservatory.us
    Pier-mounted Meade 12-inch SCT "classic"
    w. focal reducer to f/5.3 ~ FL 1630mm
    Optec TCF-S focuser
    SBIG CFW-8A and ST7-XME
    FOV ~ 15' x 10'
    H-alpha, BVRI, RGB & Clear filters
    MaxIm and, of course, ACP!
    AAVSO Code: BRIC

  4. #4
    Join Date
    Nov 2005
    Location
    Virgil, NY
    Posts
    4,556

    Default

    Just to close this out, I was able to do this entirely in VBScript.
    Dick
    www.VirgilObservatory.us
    Pier-mounted Meade 12-inch SCT "classic"
    w. focal reducer to f/5.3 ~ FL 1630mm
    Optec TCF-S focuser
    SBIG CFW-8A and ST7-XME
    FOV ~ 15' x 10'
    H-alpha, BVRI, RGB & Clear filters
    MaxIm and, of course, ACP!
    AAVSO Code: BRIC

  5. #5
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    25,833

    Default

    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.
    -- Bob

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. scripting with robofocus
    By Pierre Tremblay in forum Add-Ons, Enhancements, and Helper Components
    Replies: 1
    Last Post: Oct 9, 2013, 00:55
  2. Scripting Question
    By Russ Durkee in forum Pre-Sales Technical Questions and Help
    Replies: 3
    Last Post: Apr 22, 2009, 18:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •