Solved

Classic ASP with VBScript

Posted on 2013-11-25
1
432 Views
Last Modified: 2013-12-02
I have a much older ASP with VB Script web based application that I have to maintain. One ASP page in question is dynamic HTML (HTML and VBScript) and two ASP pages that are VBScript classes

The first class is instantiated in the Dynamic HTML ASP page while the second class has to be instantiated in the first class. In order for the instantiated object to write HTML, a Response.Write is used (Not my choice, it was written long before I showed up).

In the first instantiated object, if I instantiate the second class outside of any Response.Write statements, it works. However I have to allow the user to click a button that calls a method in the second instantiated object so I have to use Response.Write

I have tried creating the instantiated second class and the call to a method in the object in it's own function and having the OnClick call the function but I can't seem to be able to get this to work.

I was told that this might be possible by using a JavaScript function in the middle of the VBScript like:

VBScript...
%>

<Script language="javascript">

    Function MyFunction()
    {
       Call to VBScript function
     }
</script>

<%
VBScript...

Is this possible? If so do you have a simple example?
0
Comment
Question by:AmbassadorSpock
1 Comment
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39676287
Just write the second class so you can get a value from it that you can use in the Response.Write statement.  I can't see the javascript in the middle of VBscript working.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question