Solved

Classic ASP with VBScript

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 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