I want to delete all the selected (checkbox checked)items from the bag. I am trying to undersnatd the folowing code. It is suppose to produce URL like
fields?package_id=114&items=211,212
instead it give me lot of junk like
fields?package_id=%3C?=%20$this-%3Epackage-%3Eid%20?%3E&items=211,212,
each,all,any,collect,detect,findAll,grep,include,inject,invoke,max,min,
partition,pluck,reject,sortBy,toArray,zip,inspect,find,select,member,
entries,_reverse,_each,clear,first,last,compact,flatten,without,remove,
removeItem,indices,call,______array
it gies me items 212 & 212 but what this stuff
"each,all,any,collect,detect,findAll,grep,include,inject,invoke,max,min,
partition,pluck,reject,sortBy,toArray,zip,inspect,find,select,member,
entries,_reverse,_each,clear,first,last,compact,flatten,without,remove,
removeItem,indices,call,______array"
I don't undersnad this for loop and if statment
function delete_selected_internal_field(package_id)
{
var tmpURL = '/integration/delete_multiple_internal_fields?package_id=' + package_id + '&items=';
var tmpConfirm = '\n';
for (var i in selected)
{
if (selected != 0 && i != 'extend')
{
tmpURL += i + ',';
tmpConfirm += i + '\n';
}
}
if (confirm('Are you sure you want to delete these internal fields?' + tmpConfirm) == true)
location.replace(tmpURL.substring(0, tmpURL.length - 1));
}
fields?package_id=114&items=211,212
instead it give me lot of junk like
fields?package_id=%3C?=%20$this-%3Epackage-%3Eid%20?%3E&items=211,212,
each,all,any,collect,detect,findAll,grep,include,inject,invoke,max,min,
partition,pluck,reject,sortBy,toArray,zip,inspect,find,select,member,
entries,_reverse,_each,clear,first,last,compact,flatten,without,remove,
removeItem,indices,call,______array
it gies me items 212 & 212 but what this stuff
"each,all,any,collect,detect,findAll,grep,include,inject,invoke,max,min,
partition,pluck,reject,sortBy,toArray,zip,inspect,find,select,member,
entries,_reverse,_each,clear,first,last,compact,flatten,without,remove,
removeItem,indices,call,______array"
I don't undersnad this for loop and if statment
function delete_selected_internal_field(package_id)
{
var tmpURL = '/integration/delete_multiple_internal_fields?package_id=' + package_id + '&items=';
var tmpConfirm = '\n';
for (var i in selected)
{
if (selected != 0 && i != 'extend')
{
tmpURL += i + ',';
tmpConfirm += i + '\n';
}
}
if (confirm('Are you sure you want to delete these internal fields?' + tmpConfirm) == true)
location.replace(tmpURL.substring(0, tmpURL.length - 1));
}