I wish to add a flag value to indicate to the PHP routine, which functions to execute.
I have tried various options and none seem to work.
I am assuming it is a case of extending the serialised form vars, by adding my extra name/value pair.
My latest attempt is
$.ajax etc etc
data: $('#Form1').serialize().push( { 'phpFlag': 1 } ),
Which says I can not use ‘push’ on this object, which I thought was an array.
Can anyone put me out of my misery. I know I could have used a hidden form value.
Thanks
mcl
jQuery’s serialize method returns a string and not an array, just do something like this: