Solved

To read data from Javascript

Posted on 2004-04-06
3
177 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
scoreUp challenge 14 57
VB 6.0 printer how to align 6 58
Plain Text Editor for iPad 6 60
iSeries email authority 4 25
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

920 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

16 Experts available now in Live!

Get 1:1 Help Now