Solved

Using server side variable from client side

Posted on 2003-11-12
1
194 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
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

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

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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/…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

713 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