wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Values from serialize are all null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Values from serialize are all null" Watch "Values from serialize are all null" New topic
Author

Values from serialize are all null

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 497
    
    5
serialize() requires form elements to have 'name' attributes, like this:

<input id="fName" name="fName" type="text" placeholder="first name"/>
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Values from serialize are all null