[Midas] CALLBACK_CORE_RESOURCES_SELECTED

Mona Wong mona at sdsc.edu
Fri Jul 6 12:15:42 EDT 2012


	Thanks Zach, the code worked beautifully (:

Mona

On Jul 6, 2012, at 8:01 AM, Zach Mullen wrote:

> The callback only receives a list of id's for items that are selected.  You can map that id to their name from the DOM though:
> 
> if(params.items.length > 0) {
>     var itemId = params.items[0];
>     var itemName = $('#browseTable tr[type="item"][element="'+itemId+'"] td:first span').html();
>     console.log(itemName);
>     ...
> }
> 
> 
> In the javascript code you can print the contents of a variable recursively to the console by using:
> 
> console.log(variable);
> 
> This works really well on Chrome, and I'm pretty sure also on Firefox. It's my preferred method of debugging :)
> 
> Thanks,
> 
> Zach

*********************************************
    Mona Wong
    Web & iPad Application Developer
    San Diego Supercomputer Center

    You are the light you wish to see.
*********************************************






More information about the Midas mailing list