Jump to content

form only update change


tomindo

Recommended Posts

Hi guys

I got the js script below which loops through all form inputs , then check if the field value changes to other value rather than the default but for some reasons the if condition does not work, no error showed. Really need someone to shed a light on it. Maybe give me some other solutions to fulfil this task

 

$(document).ready(function() {

        $("select").change(function(){

                $("form").find("input").each(function(i) {

                        if (this.value != this.defaulValue) {

                        alert(this.value);

                        }

                        else {

                                alert("no update");   

                        }

                });

    });

 

Link to comment
https://forums.phpfreaks.com/topic/233657-form-only-update-change/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.