samedi 28 novembre 2015

How to serialize form stored in a variable jQuary

form = '<form action="javascript: this.preventDefault">'+

    '<input type="hidden" name="term" value="'+term+'" />'+

     '<input type="hidden" name="course" value="'+course+'" />'+

      <input type="hidden" name="seq_no" value="'+seq_no+'" />'+

'</form>';

var url = 'Add_Row.php?edit&',//relative path to PHP processing script

input = form.serialize();

Greetings All,

Here I am trying to place a form into a variable form after which I want to serialize that form then send it off to be processed.

However I keep getting this error from the browser:

Uncaught TypeError: form.serialize is not a function

Your help will be much appreciated

Blessings STM .




Aucun commentaire:

Enregistrer un commentaire