0

I've been tasked with making a webpage in ONLY HTML. I am at the point where I want to create forms. However, I'm not sure if these form submissions can be saved using only HTML.

I applied the following code (obtained from WC3 Schools) to my webpage:

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

I created a filed called "html_form_action.asp". However, when I double click my .html file to launch my page and I click submit (to submit the form), I receive an error "page can't be loaded" and nothing is written to my html_form_action.asp file. Is there some other way I'm supposed to set this up?

Thank You for any help! :)

3 Answers 3

1

You need to set up a web server to process your requests on the back end! There is need to have javascript as you said! Because you seem to be using ASP, setting up Microsoft IIS on your computer would be a good option.

Double clicking the HTML file will not help. You need to run it via your set up server then.

Sign up to request clarification or add additional context in comments.

Comments

1

Well, you cannot double click you html file since it would be loaded in browser as local files. The asp files need to be host in a web server (e.g., IIS).

2 Comments

thank you for the helpful advice! :D; what are the alternatives to asp files? and what is considered the standard?
Nothing can be considered "standard". There're plenty of technologies can be used as serving a web page: php, asp.net, asp, rails (and other ruby-based teches), django (or other python-based teches)...
1

Sounds like you are trying to access your .asp file from the file system, but in order for anything to happen that file needs to be behind a web server.

Not sure if you have one set up, but that's the only way you will get a response to the post request. (i.e. when you hit submit)

Also: be sure that if you have a relative path to your .asp file that it points to the right place ( or that your html file is in the right directory - for your code snippet, that means the same directory )

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.