Providing info to JavaScript whether XForm is submitted