lundi 30 janvier 2017

Uncaught ReferenceError: lookup is not defined at HTMLButtonElement.onclick

I keep getting this syntax error on the browser. I am not sure what am I missing here.

Here is my javascript.

 function lookup() {
        var query = document.getElementById("sform").value;
        //   var res = PageMethods.lookupfromjs_Click(query, onSuccess, onError);
        var dttypeList;
        $('#Button1').click(function() {
            $('input[type=\"checkbox\"]').each(function(){
                dttypeList.push(this.name);
                alert( $.toJSON(dttypeList));
            });
        });​
    }

Here is the html

<button id="Button1" onclick="lookup()" type="button">Search</button>




Aucun commentaire:

Enregistrer un commentaire