Change sendevent.jsp to use DOM via JS for broader browser compatibility