Solved

Using server side variable from client side

Posted on 2003-11-12
1
196 Views
Last Modified: 2008-03-10
I'm declaring the following in my globa.asa:

Dim x
Set Application("x") = Server.CreateObject("COMSYS.clsCOMSYS")
End Sub

Then I'm using x in my ASP pages as follows:

<%Var = Application("x").SomeMethod%>

However what I want to do is use x on the client side, but I'm confused as to what to do if my method has an argument.

For example, if i declare x on the server side of an ASP page as follows:

<%Var = Application("x").Method%>

Could i then just bring it over to the client side like this:

AgreementSearchResult = <%=AgreementSearchResultServer%>

Would this work??????

What about the argument though, what is the syntax:

AgreementSearchResult = <%=AgreementSearchResultServer.Argument%>

Looking forward to your help,

Matt.




0
Comment
Question by:Matt_Unsworth
[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 11

Accepted Solution

by:
thunderchicken earned 150 total points
ID: 9731717
I don't see why this wouldn't work.

ASP is compiled before client code is, so all you do is spit out your variable.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

627 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