Solved

JQuery Values being lost on submit

Posted on 2012-04-10
4
332 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 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

690 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