Jump to content

HTML submit form won't work


Logeman
 Share

Recommended Posts

<form name="input" action="html_form_action.asp"method="get">Username: <input type="text" name="user"><input type="submit" value="Submit"></form>This is the form I used.I named a text document html_form_action.asp and nothing appears on it after having clicked the submit button.

Link to comment
Share on other sites

It does move to html_form_action.asp, correct? The problem is just that your asp doesn't show anything...?Sounds like the problem is with the asp page -> you might want to post in the asp forum?Since the problem is with the asp page, please show the source of the asp page you are using

Link to comment
Share on other sites

Im not actually sure what the problem is. I do know though that the asp file is the same name as designated in the form. All I know is that when I hit the submit button and after I open the asp file, there's nothing there. Im not sure if it's the asp file or the html but it's not working.

Link to comment
Share on other sites

  • 2 weeks later...

Save both files in the same folder and must be run on a asp enabled serverThe code works i have tested it :) html form as before

<form name="input" action="html_form_action.asp" method="get">Username: <input type="text" name="user"><input type="submit" value="Submit"></form>

ASP code, save as html_form_action.asp

<%@ Language = VBScript %>  <% Option Explicit %>       <html> <head>      <title></title> </head>  <body>   <%                                                                                     response.write "<p>Thank you : " & request.querystring("user") & "</p>"       %>                                                                                  </body></html>

Because your form uses method get, you must use querystring() to get the info from the address bar.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...