Make javascript controls show/hide immediately after changing controls attribute. Currently, the controls only appear after the current event handler completes.