sqlite - jquerymobile selectmenu fails -


I am trying to create a list of categories with Jquerymobile-html5 and websql / sqlite.

i hope to post my code here that someone sees me what I do.

  // Load cats to choose a cat function loadCatOptions () {var option_str = ''; Option_str + = '& lt; Option value = "0" data-placeholder = "true" & gt; Select category & lt; / Option & gt; '; // option_str + = '& lt; Option value = "0" & ​​gt; Top / Guardian & lt; / Option & gt; '; Db.transaction (function (tx) {tx.executeSql ('SELECT * FROM ranges', [], function (tx, result) {var len = results.rows.length, i; for (i = 0; i & lt ; Len; i ++) {var r = results.rows.item (i); var catted = rCategories_id;} var number = 0; while (calculation & lt; catID + 1) {count; tx.executeSql ('SELECT C. Parent_id, c.categories_id, cd.categories_name, c.categories_image ranges from categories, description_description cd WHERE c.categories_id = '+ count +' and cd.categories_id = '+ count +' and cd.language_id = "1" order sort_order (I = 0; i   

The console shows all the objects in its name, so I'm sure That's the database query is correct. Maybe it was time for me to spend some time, which was not exactly at the problem. If I only search SELECT * and call on selectmenu, then I can see all the categorie_id in the list (exactly changing categories_id to the place of the categories so that it can work). So now the problem is with jquerymobile ??????????????

This does not read option_str + = inside another database query!

with your question:

/ P>

Problems Fixed

old code:

  option_str + = "& lt; option value =" + r2 ['categories_id'] + "& gt; + R2 ['categories_name'] + "& lt; / options & gt;"; Console.log ('categories name =' +2 ['categories_name']); }}); Count ++; } $ ("#Parent_id"). Html (option_str) .selectmenu ('refresh' is true); The closed tag of // count ++} was moved down; }); }    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -