Set attribut info dynamically

Is there a way to set the info attribut outside the form load with a command??

I can handle it in the onInfo event but it would be much easier to show/hide the icon per JS code.

Sorry, it is not clear which scenario you want to implement.
Please provide more details.