Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

code error

There is issue with calling save() function. You try to get values from not existing components.
After successful service call, components name has index with name.

pre
Appery("chickenpizza_item_label_1")
Appery("chickenpizza_item_label_2")
...
Appery("chickenpizza_item_label_n")
/pre

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

code error

I'm sorry Igor,
I don't follow

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

code error

Hello! You have the same problem described here https://getsatisfaction.com/apperyio/.... Try the following code:
pre$grid = $(this).closest("[name=chickenpizzamobilegrid]");
save({'Pizza':$grid.find("[name=chickenpizza_item_label]").text(), 'Size':$grid.find("[name=orderlabel]").text(),
'Base':$grid.find("[name=thin_deeptoggle]").val(),
'Price':$grid.find("[name=chickenpizzaPricelabel]").text()},
"liveoderArray");/pre
By the way this code
prevar arr = JSON.parse(localStorage.getItem(varName));
if(arr == null) {
arr = new Array();
}/pre in save and myload functions is not correct too. Please replace it with the following one:
pretry {
var arr = JSON.parse(localStorage.getItem(varName));
if ({}.toString.call(arr) !== "[object Array]") {
arr = [];
}
} catch ( e ) {
arr = [];
}/pre

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

code error

Thanks Marina,

just to check, this code you posted earlier, is it in addition to, or instead of the code below, that I was using onclick

code$grid = $(this).closest("[name=chickenpizzamobilegrid]");
save({'Pizza':$grid.find("[name=chickenpizza_item_label]").text(), 'Size':$grid.find("[name=orderlabel]").text(),
'Base':$grid.find("[name=thin_deeptoggle]").val(),
'Price':$grid.find("[name=chickenpizzaPricelabel]").text()},
"liveoderArray");/code

codesave(
{'Pizza':Tiggzi("chickenpizza_item_label").val(), 'Size':Tiggzi("orderlabel").val(),
'Base':Tiggzi("thin_deeptoggle").val(),
'Price':Tiggzi("chickenpizzaPricelabel").val()},
"liveoderArray");/code

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

code error

Instead

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

code error

Cheers Marina,
all good now,

Return to “Issues”