• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Values from serialize are all null

 
ranger
Posts: 17346
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: 17346
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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic