DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: combining Client Side and Server Side

  1. #1
    Jeff Guest

    combining Client Side and Server Side


    How do I, can I combine server side/client side script?


    <SCRIPT LANGUAGE-vbscript RUNAT=server>


    Sub btnSearch_onclick()

    *** javascript here to do some client side stuff before the server
    side stuff ***

    Session("strNDC")=Trim(txtNDC.value)
    ViewContracted.navigate.PopGrid


    End Sub


    </SCRIPT>



    How do I... can I call a javascript (client side) script and visa versa



  2. #2
    Jeff Guest

    Re: combining Client Side and Server Side


    Jeff, I've been trying to do a similar thing. I would appreciate an email
    if you have found anything. I am trying to execute a server function (Passing
    it a variable) from within a client side function. I don't think it can
    be done.












    "Jeff" <jeffm@earthlink.net> wrote:
    >
    >How do I, can I combine server side/client side script?
    >
    >
    ><SCRIPT LANGUAGE-vbscript RUNAT=server>
    >
    >
    > Sub btnSearch_onclick()
    >
    > *** javascript here to do some client side stuff before the server
    >side stuff ***
    >
    > Session("strNDC")=Trim(txtNDC.value)
    > ViewContracted.navigate.PopGrid
    >
    >
    > End Sub
    >
    >
    ></SCRIPT>
    >
    >
    >
    >How do I... can I call a javascript (client side) script and visa versa
    >
    >



  3. #3
    Todd Guest

    Re: combining Client Side and Server Side


    One way to do this is to post the form to itself.
    for instance if you have form named idFrmSubmit, and a page called Input.asp,
    you can use the following client script:

    idFrmSubmit.method = "POST";
    idFrmSubmit.action = "Input.asp?ACTION=Finish";
    idFrmSubmit.submit();

    Then, in the asp code, check for action

    If strAction = "Finish" Then
    DoSomething
    End If

    "Jeff" <jdhancock@cleveland-cliffs.com> wrote:
    >
    >Jeff, I've been trying to do a similar thing. I would appreciate an email
    >if you have found anything. I am trying to execute a server function (Passing
    >it a variable) from within a client side function. I don't think it can
    >be done.
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >"Jeff" <jeffm@earthlink.net> wrote:
    >>
    >>How do I, can I combine server side/client side script?
    >>
    >>
    >><SCRIPT LANGUAGE-vbscript RUNAT=server>
    >>
    >>
    >> Sub btnSearch_onclick()
    >>
    >> *** javascript here to do some client side stuff before the server
    >>side stuff ***
    >>
    >> Session("strNDC")=Trim(txtNDC.value)
    >> ViewContracted.navigate.PopGrid
    >>
    >>
    >> End Sub
    >>
    >>
    >></SCRIPT>
    >>
    >>
    >>
    >>How do I... can I call a javascript (client side) script and visa versa
    >>
    >>

    >



  4. #4
    Todd Guest

    Re: combining Client Side and Server Side


    You can also use hidden fields to store values on the client, and then post
    the form to itself. <INPUT ID="idHidden" TYPE="HIDDEN" VALUE="Hello">
    see below for how to use this:

    >
    >One way to do this is to post the form to itself.
    >for instance if you have form named idFrmSubmit, and a page called Input.asp,
    >you can use the following client script:
    >
    >idFrmSubmit.method = "POST";
    >idFrmSubmit.action = "Input.asp?ACTION=Finish";
    >idFrmSubmit.submit();
    >
    >Then, in the asp code, check for action
    >
    >If Request("Action") = "Finish" Then
    > If Request("idHidden") = "Hello" Then

    DoSomething
    End If
    >End If
    >
    >"Jeff" <jdhancock@cleveland-cliffs.com> wrote:
    >>
    >>Jeff, I've been trying to do a similar thing. I would appreciate an email
    >>if you have found anything. I am trying to execute a server function (Passing
    >>it a variable) from within a client side function. I don't think it can
    >>be done.
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>"Jeff" <jeffm@earthlink.net> wrote:
    >>>
    >>>How do I, can I combine server side/client side script?
    >>>
    >>>
    >>><SCRIPT LANGUAGE-vbscript RUNAT=server>
    >>>
    >>>
    >>> Sub btnSearch_onclick()
    >>>
    >>> *** javascript here to do some client side stuff before the server
    >>>side stuff ***
    >>>
    >>> Session("strNDC")=Trim(txtNDC.value)
    >>> ViewContracted.navigate.PopGrid
    >>>
    >>>
    >>> End Sub
    >>>
    >>>
    >>></SCRIPT>
    >>>
    >>>
    >>>
    >>>How do I... can I call a javascript (client side) script and visa versa
    >>>
    >>>

    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center