Click to See Complete Forum and Search --> : How to Server script from VBScript


Raj
03-15-2000, 03:10 PM
Hi I had a basic question:

I had Login Page where I am reading User ID/Password using text boxes(type
=text and password). on button click event I want to check this user ID/Password.
To check I wrote a component which will check this user ID/Password. But
I don't know how to call this method/component. I will appreciate any kind
of help.

Thanks

Here Is my HTML code

<%@language=vbscript%>
<Script language="VBScript">
sub validate()
here I don't know how to call a method, which is in DLL.
end sub
</Script>
<INPUT TYPE=text name=userid value=AutoFill size=10 >
<INPUT TYPE=password name=password size=10 >
<INPUT TYPE=button name=submit value=submit OnClick="validate()">


-Shailendra

Wade
03-15-2000, 04:04 PM
Hi,

You should be able to use something like:

Set oCheckData = Server.CreateObject("myDLL.clsCheckData")
If oCheckData.fnCheckLogIn("username", "pwd") Then
' Do what you want if true
response.redirect "..."
Else
' do what you want if false
response.redirect "..."
End If

That assumes that your DLL is myDll with a class module clsCheckData with
a function fnCheckLogIn that accepts a two strings and returns a boolean.

I'm guessing that you actually want a submit button and code instead of the
validate module so that server will do the checking rather than the client.

Have fun.

Wade.

"Raj" <schinta@ureach.com> wrote:
>
>Hi I had a basic question:
>
>I had Login Page where I am reading User ID/Password using text boxes(type
>=text and password). on button click event I want to check this user ID/Password.
>To check I wrote a component which will check this user ID/Password. But
>I don't know how to call this method/component. I will appreciate any kind
>of help.
>
>Thanks
>
>Here Is my HTML code
>
><%@language=vbscript%>
><Script language="VBScript">
>sub validate()
>here I don't know how to call a method, which is in DLL.
>end sub
></Script>
><INPUT TYPE=text name=userid value=AutoFill size=10 >
><INPUT TYPE=password name=password size=10 >
><INPUT TYPE=button name=submit value=submit OnClick="validate()">
>
>
>-Shailendra
>

Raj
03-15-2000, 04:17 PM
Thanks Wade for your help, but do you have any sample code, It will helps
me complete my task quickly.

-Shailendra.

"Wade" <wfeltman@do.usbr.gov> wrote:
>
>Hi,
>
>You should be able to use something like:
>
>Set oCheckData = Server.CreateObject("myDLL.clsCheckData")
>If oCheckData.fnCheckLogIn("username", "pwd") Then
> ' Do what you want if true
> response.redirect "..."
>Else
> ' do what you want if false
> response.redirect "..."
>End If
>
>That assumes that your DLL is myDll with a class module clsCheckData with
>a function fnCheckLogIn that accepts a two strings and returns a boolean.
>
>I'm guessing that you actually want a submit button and code instead of
the
>validate module so that server will do the checking rather than the client.
>
>Have fun.
>
>Wade.
>
>"Raj" <schinta@ureach.com> wrote:
>>
>>Hi I had a basic question:
>>
>>I had Login Page where I am reading User ID/Password using text boxes(type
>>=text and password). on button click event I want to check this user ID/Password.
>>To check I wrote a component which will check this user ID/Password. But
>>I don't know how to call this method/component. I will appreciate any kind
>>of help.
>>
>>Thanks
>>
>>Here Is my HTML code
>>
>><%@language=vbscript%>
>><Script language="VBScript">
>>sub validate()
>>here I don't know how to call a method, which is in DLL.
>>end sub
>></Script>
>><INPUT TYPE=text name=userid value=AutoFill size=10 >
>><INPUT TYPE=password name=password size=10 >
>><INPUT TYPE=button name=submit value=submit OnClick="validate()">
>>
>>
>>-Shailendra
>>
>