97
rated 0 times
[
102]
[
5]
/ answers: 1 / hits: 46102
/ 13 Years ago, tue, may 3, 2011, 12:00:00
I'm using two jsp one for searching the records and another for updating the records of the database. Search query will return a json object where it contain all the searched records and I'm generating the rows dynamically to a table for displaying. To update a record, I've kept link in every row.
Here I have to pass the json object to the updating jsp file to load the values. So, I simply passed the json object. But, I cannot process the json object. Help me out. Thanks. Please Find the code below:
function retrievesrchrec(){
var result = xmlHttp.responseText;
if(result.length>1){
var dbRecords = JSON.parse(result);
if(dbRecords)
{
while(dbRecords[index])
{
dbRecord= dbRecords[index];
var rbutton = document.createElement(input);
rbutton.type = a;
rbutton.href = function(){
javascript:loadModify(jsonobj);
};
}
}
}
}
function loadmodify(jsonobj){
alert(jsonobj);
}
More From » json