Click to See Complete Forum and Search --> : Pass Control Value to DLL Without Submit
Jeff M
07-19-2001, 10:43 AM
I am trying to pass the value in a textbox to my DLL with the following code
to store the result in a client side variable "RetVal" without submitting
the page. Here is the code:
-------------------------------------------------------------------------
<script language="vbscript">
Private Sub inpSURNAME25322_4568_OnBlur()
Dim RetVal,strCall
<% Dim Val,objOFF003,ControlVal %>
<% set objOFF003 = Server.CreateObject("OFF003.clsOFF003") %>
<% response.write "RetVal = " & chr(34) & objOFF003.Validate_inpSURNAME25322_4568("TestValue")
& CHR(34) %>
<% set objOFF003 = Nothing %>
End Sub
</script>
-----------------------------------------------------------------------
If I hard-code the parameter I pass to the DLL (ie "TestValue") it works.
I need to pass the value in the control instead without submitting.
Anyone have any thoughts...
Thanks
Matthew Solnit
07-19-2001, 01:26 PM
"Jeff M" <jeff.mcguire@core.ca> wrote in message
news:3b56f20e$1@news.devx.com...
>
> I am trying to pass the value in a textbox to my DLL with the following code
> to store the result in a client side variable "RetVal" without submitting
> the page. Here is the code:
> -------------------------------------------------------------------------
>
> <script language="vbscript">
> Private Sub inpSURNAME25322_4568_OnBlur()
>
> Dim RetVal,strCall
>
> <% Dim Val,objOFF003,ControlVal %>
> <% set objOFF003 = Server.CreateObject("OFF003.clsOFF003") %>
>
> <% response.write "RetVal = " & chr(34) &
objOFF003.Validate_inpSURNAME25322_4568("TestValue")
> & CHR(34) %>
>
> <% set objOFF003 = Nothing %>
>
> End Sub
> </script>
If you absolutely cannot submit a form to the server, then your only choice is
to do the work on the client. You can either require the client to download the
DLL, or you can reproduce the Validate method in a client-side script.
To be honest, it seems kind of weird that you can't use forms. Maybe if you
explained the bigger picture, we could give you a better solution.
-- Matthew Solnit
Jeff M
07-19-2001, 01:52 PM
"Matthew Solnit" <msolnit@nospam.yahoo-com> wrote:
>"Jeff M" <jeff.mcguire@core.ca> wrote in message
>news:3b56f20e$1@news.devx.com...
>>
>> I am trying to pass the value in a textbox to my DLL with the following
code
>> to store the result in a client side variable "RetVal" without submitting
>> the page. Here is the code:
>> -------------------------------------------------------------------------
>>
>> <script language="vbscript">
>> Private Sub inpSURNAME25322_4568_OnBlur()
>>
>> Dim RetVal,strCall
>>
>> <% Dim Val,objOFF003,ControlVal %>
>> <% set objOFF003 = Server.CreateObject("OFF003.clsOFF003") %>
>>
>> <% response.write "RetVal = " & chr(34) &
>objOFF003.Validate_inpSURNAME25322_4568("TestValue")
>> & CHR(34) %>
>>
>> <% set objOFF003 = Nothing %>
>>
>> End Sub
>> </script>
>
>If you absolutely cannot submit a form to the server, then your only choice
is
>to do the work on the client. You can either require the client to download
the
>DLL, or you can reproduce the Validate method in a client-side script.
>
>To be honest, it seems kind of weird that you can't use forms. Maybe if
you
>explained the bigger picture, we could give you a better solution.
>
>-- Matthew Solnit
>
>
Thanks for your reply.
We are trying to perform form validation as the client enters data in a control
(using ONBlur, OnChange etc.) instead of validating when the form is submitted.
We are doing this to attempt to achieve similar functionality in an ASP page
as in the client's mainframe application.
Our validation procedures are server-side since they may need to make calls
to the database through the DLL.
Thanks
devx.com
Copyright Internet.com Inc. All Rights Reserved