Solved

Classic ASP with VBScript

Posted on 2013-11-25
1
435 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 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