Solved

To read data from Javascript

Posted on 2004-04-06
3
180 Views
Last Modified: 2010-04-17
Hi

I'm Rags here, Can anybody tell me how can I get a value from javascript  variable to  a ASP  variable


Regards
Rags
0
Comment
Question by:rags_1980
3 Comments
 
LVL 22

Accepted Solution

by:
Snarf0001 earned 250 total points
ID: 10768832
The only way that I'm aware of is to load it into a hidden field so that it goes back to the server in the response.
ie

<script>

var ValueToPass;

function TransferValues()
{
  document.Form1.HoldValues.value = ValueToPass.toString();
  return true;
}
</script>

<form name="Form1" action="somewhere.asp" method="post" onSubmit="return TransferValues();">
  <input type="hidden" name="HoldValues">
</form>
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

810 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