Client Side and Server Side Scripts 
Author Message
 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



Fri, 07 Jul 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Client side scripting / server side scripting

2. Client side scripting / server side scripting

3. Client side and Server side script working together

4. Mixing of client-side and server-side scripts

5. Accessing Data generated with client-side script from server-side script

6. Calling Server Side Script from Client Side Script

7. Call Server Side Script From Client Side Script

8. ASP referring to server side variables in client side script

9. Client Side + Server Side Scripts

10. Server Side writing Client Side scripts

11. Passing Server Side Arrays to Client Side Scripts

12. Server side variables to client side script?

 

 
Powered by phpBB® Forum Software