troubleshooting Question

how to add asp code inside javascript?

Avatar of sasha85
sasha85 asked on
4 Comments1 Solution754 ViewsLast Modified:
i got this code
<script type="text/javascript">
function Session_Redirect(){
    window.location = "redirect.asp"
<body onLoad="setTimeout('Session_Redirect()', 1200000)">
after 20min of timout on page it redirects to another page...
i need that the following code will somehow be executed before the redirection:
dim mysqlm, connasa, connstringasa, vabo, namo
Set connasa = Server.CreateObject("ADODB.Connection")
ConnStringasa = sql string
Connasa.Open ConnStringasa
vabo = request.cookies("devUserName")
 mySQLm="UPDATE crmats SET online='" & namo & "' WHERE username='" & vabo & "'"
set Connasa=nothing
is there a better way then printing with writeln?


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros