• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Values from serialize are all null

 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, So I am getting further. I can actually see my popup trying to post to my backend controller. However, all the values are null. I am trying to use serialize() since that seems to be what everyone online is saying to use.

Here is my support.jsp page



And here is the js file



At var formValues = $("#registration").serialize();
alert(formValues);

I get blank, even though I have filled in the input fields on the UI.

My only guess is that I am not using submit, but have an link instead that calls the click function. I hope I don't have to have a <input type="submit" ..> to get that to work. Then have to disable the submit or return false;

Thanks

Mark
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
serialize() requires form elements to have 'name' attributes, like this:

<input id="fName" name="fName" type="text" placeholder="first name"/>
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Karthik Shiraly wrote:serialize() requires form elements to have 'name' attributes, like this:

<input id="fName" name="fName" type="text" placeholder="first name"/>



Thank you very much, that is exactly what I needed.

Mark
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic