[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

ASP / Variables

Posted on 1998-09-24
2
Medium Priority
?
282 Views
Last Modified: 2013-12-25
I am using IE4 and ASP(the VBScript version).

I have an ASP page that needs to keep track of a variable from one frame to the other.  So, I have stored this 'variable' in a hidden text box.  However, I do not know how to read the contents of a text box from an ASP rountine.  So I have tried storing the data in the hidden text box, reading it out with VBScript, then reading the VBScript variable with my ASP code.  It won't let me share the variables like that.

Does anyone know how to either A.) Read the contents of a text box from ASP or B.) Share a variable between VBScript and ASP?
0
Comment
Question by:Egore
[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
2 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 140 total points
ID: 1855263
You must be very careful with the difference between server-side script and client-side script. Those may use the same language (VBScript, or Javascript), and are written in the same asp-file, but they will run on different machines:

server-sdie script (between the <% and %>) runs on the server. Client side script runs on the machine of the visitor.

To share variables between them you have to have some interaction:

client -> server: submission of a form
server -> client: sending HTML/script code on request

=============
To read the variables from a submitted form in ASP, do this:
This "transfers" client side variables to the server.
<%
MyVar1 = Request("name_of_the_formvariable")
%>
================
To bring server-side variables to client side script use something like this:



<%
MyVar2 = "This is a server-side string"
%>

<script language="vbscript">
'this is client side script
MyClientVar = <%=MyVar2%>
</script>

============

As you can see there is no way to define a variable that is really shared by client and server, there always has to be some transfer of information.

0
 
LVL 3

Author Comment

by:Egore
ID: 1855264
The problem with your answer is that I need the exact opposite to take place.  Either client to server variable transfer or I need the server-side script to acces text boxes that ARE NOT submitted to the page.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

649 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