switchApp from Javascript