Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to use if else statement to hide the array

Author  Topic 

lydia
Starting Member

34 Posts

Posted - 2012-03-27 : 04:33:08
Anyone could help me ? I would like to know how to use if else statement to hide the array :) Thanks in advance


var a = new Array;
a[0] = new Array;
a[0]['caption'] = "user";
a[0]['isOpen'] = false;
a[0]['isChecked'] = 2;
a[0]['children'] = new Array;
a[0]['children'][0] = new Array;
a[0]['children'][0]['caption'] = "edit user";
a[0]['children'][0]['children'] = new Array;
a[0]['children'][0]['children'][0] = new Array;
a[0]['children'][0]['children'][0]['caption'] = "Change Password";
a[0]['children'][0]['children'][0]['url'] = "http://XX/fixasset/change_pwd.asp";
a[0]['children'][0]['children'][0]['target'] = "content_frame";


a[1] = new Array;
a[1]['caption'] = "Product Departement";
a[1]['children'] = new Array;
a[1]['children'][0] = new Array;

a[1]['children'][0]['caption'] = "Hong Kong Disneyland";
a[1]['children'][0]['children'] = new Array;

a[1]['children'][0]['children'][0] = new Array;
a[1]['children'][0]['children'][0]['caption'] = "Customer Call to 1451 and Top up";
a[1]['children'][0]['children'][0]['url'] = "http://XX/fixasset/hongkong.asp";
a[1]['children'][0]['children'][0]['target'] = "content_frame";

a[1]['children'][0]['children'][1] = new Array;
a[1]['children'][0]['children'][1]['caption'] = "Total sub. Call to 1451 and Top up";
a[1]['children'][0]['children'][1]['url'] = "http://XX/fixasset/total_sub.asp";
a[1]['children'][0]['children'][1]['target'] = "content_frame";

a[1]['children'][0]['children'][2] = new Array;
a[1]['children'][0]['children'][2]['caption'] = "Customer Lucky E-card and Gold";
a[1]['children'][0]['children'][2]['url'] = "http://XX/fixasset/lucky_draw.asp";
a[1]['children'][0]['children'][2]['target'] = "content_frame";


a[2] = new Array;
a[2]['caption'] = "IT Departement";
a[2]['children'] = new Array;
a[2]['children'][0] = new Array;

a[2]['children'][0]['caption'] = "Call detail";
a[2]['children'][0]['children'] = new Array;

a[2]['children'][0]['children'][0] = new Array;
a[2]['children'][0]['children'][0]['caption'] = "Call detail prepaid";
a[2]['children'][0]['children'][0]['url'] = "http://XX/fixasset/prepaid_calldetail.asp";
a[2]['children'][0]['children'][0]['target'] = "content_frame";

a[2]['children'][0]['children'][1] = new Array;
a[2]['children'][0]['children'][1]['caption'] = "Call detail postpaid";
a[2]['children'][0]['children'][1]['url'] = "http://XX/fixasset/postpaid_Calldetail.asp";
a[2]['children'][0]['children'][1]['target'] = "content_frame";

a[2]['children'][0]['children'][2] = new Array;
a[2]['children'][0]['children'][2]['caption'] = "Check IMSI";
a[2]['children'][0]['children'][2]['url'] = "http://XX/fixasset/check_imsi.asp";
a[2]['children'][0]['children'][2]['target'] = "content_frame";
   

- Advertisement -