Skip to content Skip to sidebar Skip to footer

Javascript Onchange()

i am new to JS and Programming.. i want to learn How to Implement onchange() in a text field in a form and capturing the value of that form field if the value is changed and i want

Solution 1:

To store a value in a text file on the server, you will need to send the data from the client. Your best bet is probably to add an ajax call in the onChange function to a special php page which simply stores the value.

http://www.w3schools.com/jsref/event_onchange.asp

http://www.w3schools.com/ajax/default.asp

Solution 2:

I recommend this article from Mozilla about using files in Web applications.

The simplest example they offer includes snippets such as:

// Dynamically adding a change listenervar inputElement = document.getElementById("inputField");
inputElement.addEventListener("change", handleFiles, false);
functionhandleFiles() {
    var fileList = this.files; /* now you can work with the file list */
}

Note: I'd be cautious with anything you read on W3Schools. Their information is more geared towards SEO than accuracy.

Post a Comment for "Javascript Onchange()"