DOM & VBSCRIPT, Global Variable Problem
Posted on 1998-10-15
I have these two DOM events, I would like the value of g_startTime to be the value from the onunload event but I am not sure how to make it global I have tried a <script> public g_startDate </script> but to no avail. Basically what I am trying to do is time the interval in seconds between the loading and unloading of a web page.
<SCRIPT FOR=window EVENT=onload LANGUAGE="VBSCRIPT">
window.status = "Page is loaded!"
g_endTime = Now()
MsgBox("Start Time: " & g_startTime & " End Time: " & g_endTime)
MsgBox( (DateDiff("s",g_startTime, g_endTime)) )
<SCRIPT FOR=window EVENT=onunload LANGUAGE="VBSCRIPT">
window.status = "Page is Unloaded!"
g_startTime = Now()
MsgBox("Start Time: " & g_startTime)