Link to home
Start Free TrialLog in
Avatar of xtc001
xtc001

asked on

Asp with Javascript

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.
ASKER CERTIFIED SOLUTION
Avatar of Zlatin Zlatev
Zlatin Zlatev
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hdane
hdane

Or save it in a session.
@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.
Avatar of xtc001

ASKER

Thanks very much, i will try that out.