This is a discussion on "what is wrong with this code" within the JavaScript Forum section. This forum, and the thread "what is wrong with this code are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
what is wrong with this code
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
what is wrong with this code
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
https://administration.irfan.dev/integration/delete_multiple_internal_ fields?package_id=114&items=211,212 instead it give me lot of junk like https://administration.irfan.dev/integration/delete_multiple_internal_ fields?package_id=%3C?=%20$this-%3Epackage-%3Eid%20?%3E&items=211,212, each,all,any,collect,detect,findAll,grep,include,i nject,invoke,max,min, partition,pluck,reject,sortBy,toArray,zip,inspect,find,select,member, entries,_reverse,_each,clear,first,last,compact,fl atten,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,fl atten,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[i] != 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)); } |
|
|
![]() |
| Tags |
| wrong, code |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] What have I done wrong in this code? | acrikey | JavaScript Forum | 6 | Mar 23rd, 2008 22:39 |
| What is wrong with my code | acrikey | Flash & Multimedia Forum | 9 | Jul 30th, 2007 16:19 |
| What's wrong with this code?? | Lexxi | JavaScript Forum | 1 | Apr 26th, 2007 01:07 |
| AAArrrgggg....what;s wrong with this code | murf | JavaScript Forum | 2 | Nov 25th, 2006 00:50 |
| Can somebody give me the code to hide the source code? | renren | JavaScript Forum | 7 | Mar 7th, 2006 12:27 |