Questions tagged [serializearray]

79 questions
-1
votes
1 answer

Remove some elements from serializeArray()

this is my serializeArray.I want get only these 2 push attributes only.other elements in form don't necessary. how to remove others and only keeps these two push values(Attributes and Actions) var a = this.serializeArray(); …
SashaAlex
  • 47
  • 1
  • 15
-1
votes
1 answer

Any way to Save form data without Submit form using $("#Form").serializeArray()?

Any way to Save form data without Submitting form using $("#Form").serializeArray(). When I'm using serializeArray, it works only with form submit and not working with a button click When i call this function in from cshtml page, I not getting form…
rgb
  • 143
  • 3
  • 15
-2
votes
1 answer

Error Uncaught SyntaxError: Unexpected string. But my array seems to be fine

I can't seem to find whats wrong in this code. I keep getting Uncaught SyntaxError: Unexpected string in Chrome console. var json =…
Selmer
  • 3
  • 4
-4
votes
2 answers

How can I serializeArray with a structure based on key value?

I am creating an Array from a form via serializeArray() in jQuery: var form = $(this).closest('form'); var formData = form.serializeArray(); If I output this with alert(formData.toSource()); I get the result: [{name:"form[username]", value:"1"},…
peace_love
  • 6,229
  • 11
  • 69
  • 157
1 2 3 4 5
6