
Client Side and Server Side Scripts
Hello All,
I have another problem and wondering if anyone could shed some light. Look
at this script below;
<script language="VBScript">
<!--
Sub hnn_OnClick
<%RstObj.MoveNext
If RstObj.EOF then
RstObj.MovePrevious
End if%>
document.hs.historydate.value = "<%=RstObj("history date")%>"
document.hs.historynote.value = "<%=RstObj("history note")%>"
MsgBox "Button", 0, "My Box"
End Sub
Sub hnp_OnClick
MsgBox "Previous", 0, "My Box"
End Sub
Sub hnf_OnClick
MsgBox "First", 0, "My Box"
End Sub
Sub hnl_OnClick
MsgBox "Last", 0, "My Box"
End Sub
-->
</Script>
That script works, but if I try to put any more server side script within
the the script none of the buttons work, nothing happens. Let me type
another sample snippet.
<script language="VBScript">
<!--
Sub hnn_OnClick
<%RstObj.MoveNext
If RstObj.EOF then
RstObj.MovePrevious
End if%>
document.hs.historydate.value = "<%=RstObj("history date")%>"
document.hs.historynote.value = "<%=RstObj("history note")%>"
MsgBox "Button", 0, "My Box"
End Sub
Sub hnp_OnClick
<%RstObj.MovePrevious
If RstObj.BOF then
RstObj.MoveNext
End if%>
document.hs.historydate.value = "<%=RstObj("history date")%>"
document.hs.historynote.value = "<%=RstObj("history note")%>"
MsgBox "Previous", 0, "My Box"
End Sub
Sub hnf_OnClick
MsgBox "First", 0, "My Box"
End Sub
Sub hnl_OnClick
MsgBox "Last", 0, "My Box"
End Sub
-->
</Script>
The top one works, but the bottom doesn't. Can anyone help?
Thanks,
Jordan