troubleshooting Question

how to add asp code inside javascript?

Avatar of sasha85
sasha85 asked on
JavaScriptASPJScript
4 Comments1 Solution754 ViewsLast Modified:
i got this code
<html>
<head>
<script type="text/javascript">
<!--
function Session_Redirect(){
    window.location = "redirect.asp"
}
//-->
</script>
</head>
<body onLoad="setTimeout('Session_Redirect()', 1200000)">
</body>
</html>
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")
namo=Time()
 mySQLm="UPDATE crmats SET online='" & namo & "' WHERE username='" & vabo & "'"
connasa.execute(mySQLm)
Connasa.close
set Connasa=nothing
%>
is there a better way then printing with writeln?

Help?:)
ASKER CERTIFIED SOLUTION
Member_2_3718378

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