how to read a json file from jquery using $.get method when the nodes are only known at run time suppose the user browseing the link www.abc.com?operation='insert'
www.abc.com?operation='delete' ex json file {"insert":"You have insert link ","delete":" you are on delete link "}
I wants to load the respective message
i read the url succss full using jquery but how to handle json
function message() { var operation ; if(op="Insert") { operation ="insert"; } if(op="Insert") { operation ="delete"; } //here iam ging the node name dyanmically is it possible todo like that var mymessage = "jd."+operation;
How to read jquery nodes dynamically at run time
how to read a json file from jquery using $.get method when the nodes are only known at run time
suppose the user browseing the link
www.abc.com?operation='insert'
www.abc.com?operation='delete'
ex
json file {"insert":"You have insert link ","delete":" you are on delete link "}
I wants to load the respective message
i read the url succss full using jquery but how to handle json
$(document).ready(function () {
$.getJSON('/persistent/Json/homepage.json', function (data) {
jd = data;
message();
});
});
function message()
{
var operation ;
if(op="Insert")
{
operation ="insert";
}
if(op="Insert")
{
operation ="delete";
}
//here iam ging the node name dyanmically is it possible todo like that
var mymessage = "jd."+operation;
alert(mymessage);
}