Solved

Classic ASP with VBScript

Posted on 2013-11-25
1
422 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 82

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now