Solved

Using server side variable from client side

Posted on 2003-11-12
1
189 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
1 Comment
 
LVL 11

Accepted Solution

by:
thunderchicken earned 150 total points
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

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/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

728 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

10 Experts available now in Live!

Get 1:1 Help Now