Fix some javascript errors, trying to access nonexistent widgets

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Melissa Ceraso <mceraso@biblio.org>
Signed-off-by: Ben Shum <bshum@biblio.org>