Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

javascript question

  • 25-03-2010 7:24pm
    #1
    Closed Accounts Posts: 4


    i have a hash table in java script as below

    this.type_list = $H({ banner: })



    i want to do this :

    var tt = 'type_list'
    var arr = c.tt.get(banner);

    how can i achieve this? thanks.


Comments

  • Closed Accounts Posts: 4 cistov


    Is this what you're trying to do?

    function myConstructor() {
    this.type_list = $H({ banner: });
    }
    var c = new myConstructor();
    var tt = 'type_list';
    var arr = c[tt].get('banner');


  • Users Awaiting Email Confirmation Posts: 351 ✭✭ron_darrell


    mayur wrote: »
    i have a hash table in java script as below

    this.type_list = $H({ banner: })



    i want to do this :

    var tt = 'type_list'
    var arr = c.tt.get(banner);

    how can i achieve this? thanks.

    try this:
    var tt = c.type_list;
    var arr = tt.get(banner);
    


Advertisement