-
Apr 16th, 2007, 11:52 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] User inputs
I'm pretty good with simple html and VB6, but this is the 1st time I've tried using VBScript and ASP.
I'm having trouble figuring out how to get the user inputs from a form.
Right now I'm getting a 405 error from these two pages.
Page.asp
vbcode Code:
<HTML>
<HEAD>
</HEAD>
<BODY>
<FORM METHOD="post" ACTION=”Chk.asp”>
<INPUT TYPE="Checkbox" NAME="Check" VALUE="Check"><br>
<INPUT TYPE="Submit" NAME="Submit" VALUE="Submit">
</FORM>
</BODY>
</HTML>
Chk.asp
vbcode Code:
<Script Language="VBScript">
<HTML>
<HEAD>
</HEAD>
<BODY>
<%Response.Write Request.Form("Check")%>
</BODY>
</HTML>
What am i doing wrong?
-
Apr 17th, 2007, 07:40 AM
#2
Lively Member
Re: User inputs
correct the quotes of action method of form tag
Code:
<FORM METHOD="post" ACTION="Chk.asp">
and write code in chk.asp like
Code:
<html>
<head>
</head>
<body>
<%Response.Write Request.Form("Check")%>
</body>
</html>
-
Apr 17th, 2007, 09:19 AM
#3
Thread Starter
Frenzied Member
Re: User inputs
Thx Rasana,
Just tried it, but I'm still getting the same 405 error.
-
Apr 17th, 2007, 10:59 AM
#4
Re: User inputs
What server are you using? If its IIS check that it understands what to do with the .asp extension when used with POST. script map settings I think its called.
-
Apr 17th, 2007, 02:58 PM
#5
Thread Starter
Frenzied Member
Re: User inputs
Thx DeadEyes,
I opened PWS, went into the Advanced section, selected the directory with the asp pages and hit the Edit Properties button.
Under 'Access' the Read and Scripts options were check marked.
I check marked the Execute option and that's fixed the error.
But I don't understand the results I'm getting.
They seemed to be backward.
I renamed the checkbox and changed the line in Chk.asp in case the name 'Check' was messing with things.
I think I understand the return now, someone let me know if I have it right.
If a checkbox is checked, it returns whatever you assigned to it's 'value=' section.
If it's not check marked it doesn't return anything.
-
Apr 18th, 2007, 11:22 AM
#6
Re: User inputs
You are correct only ticked checkboxes get submitted. Also if a control is disabled then it won't be submitted either.
-
Apr 18th, 2007, 05:55 PM
#7
Thread Starter
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|