- Code: Select all
var myid=10101;
var title="D'or Say";
var mysubtitle="Scottsdale, AZ";
var myimage="";
var mysection=0;
var myimageright=0;
var mycallback="selectCustomer("+myid+",'"+escape(mytitle)+"')";
tableView.insertRecord(mytitle,mysubtitle,myimage,mysection,myimageright,mycallback);
function selectCustomer(id,name) {
NKAlert (name);
}
With this code, (some removed for easy reading, such as building the tableview) When I tap the row, It does not give me an Alert. seems like a problem with the title. But the title is Escaped, so it should show up, right?
If I change mytitle to something without an apostrophe, it works fine.
All of this data is actually coming from a database using an AJAX Call and being returned as XML. For this example, I have hardcoded the values, but get the same results.
If I try to NKAlert("D%27or"); it fails as well. So something about %27 (')
%20 shows a space. So it is getting unescaped before moving on.
Anyone know how to get this working?
