<script language = "javascript"> function GetSessionTime() { var testtime = document.getElementById("myID") return testtime } </script> <script language=' javascript'> myTestReminderTime=GetSessionTime() </script>Also.... If you set a public variable to Session("AlarmTime")
<%=publicVariableName/%>syntax
>Private Sub DataGridActivities_SelectedIndexChanged _ > (ByVal sender As System.Object, ByVal e As System.EventArgs)_ > Handles DataGridActivities.SelectedIndexChanged > Trace.Write("DataGridActivities_SelectedIndexChanged", _ > "We're in the DataGridActivities_SelectedIndexChanged event") > > 'set the session variable > Session("AlarmTime") = _ >IIf(IsDBNull(oledbDS.Tables("Activities").Rows(DataGridActivities.SelectedIndex).Item("Alarm_Status")), _ > "", _ > oledbDS.Tables("Activities").Rows(DataGridActivities.SelectedIndex).Item("Alarm_Status")) > > 'set the field used to set the alarm time > txtReminderTime.Text = Session("AlarmTime") >End Sub >>
><script language="vbscript" id="clientEventHandlersVBS"> ><!-- Sub btnSetAlarm_onclick DIM TestDate TestDate = DateDiff("d",#01/01/1900#,Now) dim myReminderTime dim myHour dim myMinute dim mySecond <% myTestReminderTime = Session("AlarmTime") % myReminderTime = GetTextBoxValue() myHour = hour(myReminderTime) myMinute = minute(myReminderTime) mySecond = second(myReminderTime)+5 Call ctAlarm1.SetTimeAlarm(TestDate, myHour, myMinute, mySecond) msgbox("Alarm set to fire at=" & TestDate & " - myReminderTime=" & myReminderTime) msgbox("myHour=" & myHour & " myMinute=" & myMinute & " mySecond=" & mySecond) msgbox("myTestReminderTime=" & myTestReminderTime) End Sub --> ></script> >>
>><script language = 'javascript'> >> function GetTextBoxValue{ >> var oTextBox = document.getElementById('TextBoxID') >> return oTextBox.value >> } >></script> >>>>Check out: http://www.mozilla.org/docs/dom/domref/dom_doc_ref48.html