How to remove data from form field after refreshing? [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I made a form with text fields,i want that data in the form should clear after pressing F5 key.
By reloading this is happening.
Any suggestion......

The F5 is under the control of the browser so you can't do anything about it. But you can place a reset button on your form.

Use the autocomplete="off" attribute. See also How to Turn Off Form Autocompletion at MDN.

Related

How to spoof a closed google form ("...no longer accepting responses")? I want to submit a form after deadline [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
How to spoof a closed google form ("...no longer accepting responses")? I want to submit a form after deadline. How can I access and submit a form when it has been closed? The source of the closed form seems quite extensive. I wonder if it can be modified to spoof the original form?
It is impossible. The validation is both on front-end and back-end sides, so it is quite easy to edit HTML and JS to pass front-end side, but you can't do anything with back-end (server validation).

How to stop users to make changes in values by using Inspect Element / Developer Tool or by pressing F12? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How to stop users to make changes in values by using Inspect Element / Developer Tool or by pressing F12?
Presently users are able to make changes in values. I want to stop it.
Is there any idea with out disabling keys?
You can not prevent that, because it happens on the users computers, and you have no control over those (usually).

How do I submit the first form on a page with JavaScript? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
How do I automatically submit the first form on the page with a userscript on Tampermonkey?
For example, there are three forms/submit buttons on the page. When the userscript is loaded, it automatically submits the first form found on the page, as if pressing the submit button.
The same way you would from the document itself:
document.forms[0].submit()

What is onSubmitCheck for? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm working on a form which has this code in the submit button :
<input type="submit" onclick="return onSubmitCheck(document.forms['name'])">
When I delete this part onclick="return onSubmitCheck(document.forms['name'])" it works as normal as before so I don't have any idea what is that for.
Is it for security of form or something else?
Is it ok to remove it?
From the look of it, it is a JavaScript function which is suppose to run when you click on the submit button. You need to look at your JavaScript files and find the function and see what it does.
Whether it is safe to remove or not, depends on what it does.

jQuery/Javascript border around empty form fields [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Recently I decided to learn Javascript and have been trying to create a script that will put a border around empty elements before the form is submitted. Essentially I want the form to be live validation and notify the user before they click submit. Any help would be greatly appreciated.
There are very many plugins if you want to use jQuery as your title suggests:
http://www.jquerybyexample.net/2014/05/15-useful-jquery-validation-plugins.html
Just pick whatever you want :-)
Or if you want to use plain JS, just search "javascript form validation" on google, you'll find thousands of entries, e.g.
http://www.learn-javascript-tutorial.com/javascript-form-validation.cfm and http://www.tizag.com/javascriptT/javascriptform.php

Categories