?
Solved

Asp with Javascript

Posted on 2003-03-03
4
Medium Priority
?
253 Views
Last Modified: 2010-04-17
I need to find out whether there is a way of calling Javascript variables from a separate asp file? I have created 3 web pages containing some Javascript to work out the Time spent on each page - each page containing a variable with the time stored.

When they leave the final site, i wanted the users to click on a "Time on Site" submit button which calls an 'asp' page which adds up all the times from the 3 webpages - forming the total time. I want to store this total time into a database.
0
Comment
Question by:xtc001
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
Zlatin Zlatev earned 200 total points
ID: 8062900
Use < input type="hidden" > tags for storing the javascript variables values and posting them from page tro page on each page submit.

HTH,
Zlatin Zlatev
0
 
LVL 1

Expert Comment

by:hdane
ID: 8063673
Or save it in a session.
0
 
LVL 8

Expert Comment

by:Zlatin Zlatev
ID: 8063731
@xtc001, as hdane has said, you can save javascript variables from into session, as soon as you got them on the server.
Client side variables (in client-side javascript) IMHO can only be posted to the server using hidden input fields.
Also you should note that navigation between forms should be done using post requests.
0
 

Author Comment

by:xtc001
ID: 8064275
Thanks very much, i will try that out.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Loops Section Overview

569 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