?
Solved

Asp with Javascript

Posted on 2003-03-03
4
Medium Priority
?
252 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
[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
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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

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
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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…
Introduction to Processes

752 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