Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

JQuery Values being lost on submit

Posted on 2012-04-10
4
Medium Priority
?
334 Views
Last Modified: 2012-04-11
The code below successfully populates the fields with the results of the JSON request.  The problem is that when I submit the form to insert into the database the fields are wiped and I get null values.  What am I doing wrong?  Thanks!


 $('.address-result').live('click', function (event) {
		            // Put the selected address data in the result div (you could do whatever you want here)
		            $('#dialog').dialog('close');
		            var raw = $(this).find('.complete-address').html();
		            var json = JSON.parse(raw);
                  
		            $("#txtLat").val(json["metadata"]["latitude"]); // This Display in text box
		            $("#txtLong").val(json["metadata"]["longitude"]);
//		            $("#txtPrecision").val(json["metadata"]["percision"]);
		            $("#txtCounty").val(json["metadata"]["county_name"]);
		            $("#txtRDI").val(json["metadata"]["rdi"]);
		            $("#txtVacant").val(json["analysis"]["dpv_vacant_code"]);
		        });
		    });

Open in new window

0
Comment
Question by:rcowen00
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 23

Accepted Solution

by:
basicinstinct earned 2000 total points
ID: 37830293
just before you submit the form take a look at the html... (F12 in Google Chrome)

are your inputs inside the same html form as the submit button?
do your inputs all have name and value attributes set?
0
 

Author Comment

by:rcowen00
ID: 37833669
Yes, to both of your questions.
0
 

Author Comment

by:rcowen00
ID: 37833683
The problem is with the stored procedure.  I just realized that one of the fields is inserting as expected.
0
 

Author Comment

by:rcowen00
ID: 37833872
It was not a problem with the stored procedure but the settings on the field.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question