Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


VarType and passing values in forms

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,111
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> VarType and passing values in forms
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 VarType and passing values in forms - 6/5/2001 8:49:31 PM   
  Therarez

 

Posts: 12
Score: 0
Joined: 5/22/2001
From: Mexico
Status: offline
Hi again...

I'm having a strange problem...I am writing a login/pw validate
script. I have written one before, and it worked fine. All of a sudden
though, I'm having problems with data type mismatches. I have
checked everything, tried using cStr functions etc...nothing works. So
I just wanted to see what type of variable was coming in from my
imput form. I wrote the following .asp:

<%@ LANGUAGE="VBSCRIPT" %>
<% Dim Prefix, Crdnum, strPIN
Prefix = "12345678901"
Crdnum = Request.form("Cardnum")
Crdnum = Prefix&Crdnum
strPIN = Request.form("PIN")
%>
<html>
<head>

</head>
<body>
Hi <%=CrdNum%>! Your PIN is <%=strPIN%>
<SCRIPT LANGUAGE = "vbscript">
<!--
Alert "CrdNum is a type " & VarType(CrdNum) & " Variant and
strPIN is a type " & VarType(strPIN) & "Variant."
-->
</SCRIPT>
</body>
</html>

It displays the variables when prompted to do so in the HTML
document, but when it alerts me of the VarType, both are "0",
meaning empty. But it just put the variables on the web page, so
obviously they're not empty! Any ideas as to what's going on?
 
 
Post #: 1
 
 Re: VarType and passing values in forms - 6/5/2001 8:51:04 PM   
  adminkoe

 

Posts: 117
Score: 0
Joined: 12/23/2000
From:
Status: offline
Try this instead...

<SCRIPT LANGUAGE = "vbscript">
<!--
Alert "CrdNum is a type " &
<%=VarType(CrdNum)%> & " Variant and strPIN is a
type " & <%=VarType(strPIN)%> & "Variant."
-->
</SCRIPT>

Regards,
Andi Zain

(in reply to Therarez)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> VarType and passing values in forms Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts