Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

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
[443 byte] By [Jeff] at [2007-11-9 15:35:09]
# 1 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
>
>
Jeff at 2007-11-11 23:41:42 >
# 2 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
>>
>>
>
Todd at 2007-11-11 23:42:37 >
# 3 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
>>>
>>>
>>
>
Todd at 2007-11-11 23:43:40 >