what is wrong with this code

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 28th, 2006, 13:18
New Member
Join Date: Jun 2006
Location: canada
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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));
}
Reply With Quote

Reply

Tags
wrong, code

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 11:30.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43