I have a form :
<FORM name="loginForm" ACTION="https://www.example.com/cgi-bin/login.pl" METHOD="post">
The form submits a username and password to my perl script on the server which verifies the password is correct. However since my page login.html is a static page is it possible to have the Post return the value to me somehow in a javascript that will display to the user an error message if the password did not match for example, without having to go to a different page.
This can obviously be done by the server, serving a new page, but that’s not what im looking for. Any ideas?
You want to use XMLHttpRequest to post the form contents from JavaScript.
If you’re using jQuery, there is an example on the jQuery.post() page:
See the bottom example on the page (“Example: Post a form using ajax and put results in a div”) to get more complete code for how to get the return value form the server.