Results 1 to 7 of 7

Thread: [RESOLVED] User inputs

  1. #1

    Thread Starter
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Resolved [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:
    1. <HTML>
    2. <HEAD>
    3. </HEAD>
    4.  
    5. <BODY>
    6. <FORM METHOD="post" ACTION=”Chk.asp”>
    7.  
    8.   <INPUT TYPE="Checkbox" NAME="Check" VALUE="Check"><br>
    9.   <INPUT TYPE="Submit" NAME="Submit" VALUE="Submit">
    10.  
    11. </FORM>
    12.  
    13. </BODY>
    14. </HTML>

    Chk.asp
    vbcode Code:
    1. <Script Language="VBScript">
    2. <HTML>
    3. <HEAD>
    4. </HEAD>
    5.  
    6. <BODY>
    7. <%Response.Write Request.Form("Check")%>
    8. </BODY>
    9. </HTML>

    What am i doing wrong?

  2. #2
    Lively Member rasana's Avatar
    Join Date
    Jan 2007
    Location
    Mumbai, (India)
    Posts
    94

    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>

  3. #3

    Thread Starter
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: User inputs

    Thx Rasana,

    Just tried it, but I'm still getting the same 405 error.

  4. #4
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    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.

  5. #5

    Thread Starter
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    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.

  6. #6
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: User inputs

    You are correct only ticked checkboxes get submitted. Also if a control is disabled then it won't be submitted either.

  7. #7

    Thread Starter
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: User inputs

    K, Thx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width