Jotform embedded javascript code not functioning properly