Hi,
I asked a question about adding items to a select list https://getsatisfaction.com/apperyio/...
I have followed the tutorial and I am successfully adding items to the list,
var text = results.rows.item(i).Registration;
dropDown.append('' + text + '');
When an Item is selected from the list I am writing the selected item to a local storage variable:
var str = "";
$("select option:selected").each(function () {
str += $(this).val() + ' ' ;
});
str = str.replace(' on', '');
if (str.substring(str.length-1) == " ")
{
str = str.substring(0, str.length-1);
}
localStorage.setItem('_reg', str);
then using the variable to query a phonegap sql table the query returns no row although the matching record exists in the table .
It appears that the query fails because the string held in the select list item has characters or spaces added. I am able to query the table successfully by hard coding the query parameter to the value shown in the select list which is what leads me to believe that the value returned from the select is not the same as the displayed value. I hope you are able to follow all of this and advise me on how to return the true value from the select.
Regards,
Joe