/* * krishan Kumar Sharma 09/22/2009 * Migrated from 213 server (VI-207) */ var oldPollInfo = ''; /* * Name: * savePoll * * Description: * submits poll form through ajax. * * Preconditions/Input: * - formName REQUIRED poll form name * - pollAjaxFlag REQUIRED if it is true then poll save by ajax otherwise poll save by submit form. * - poll REQUIRED poll id info * - stnBox REQUIRED stnBox id info * - boxType REQUIRED boxType id info * * Postconditions/Output: * - returns result. * * Log: * Ashok Vaishnav * - Creation 07/27/2009 * */ function savePoll(pollAjaxFlag, formName, poll, stnBox, boxType, stnPageId) { formObj = document.getElementById(formName) formElements = formObj.elements; formElementsLength = formElements.length; isChecked = false; for(i=0; i Please wait while saving result ...'; getAjaxData(url,'POST',urlStr,'showPollResult', '', '', stnBox); } else { return true; } }//End of savePoll() /* * Name: * showPollResult * * Description: * shows poll result. * * Preconditions/Input: * - formObj REQUIRED poll form object * * Postconditions/Output: * - shows poll result. * * Log: * Ashok Vaishnav * - Creation 07/27/2009 * */ function showPollResult (xmlHTTP, stnBox) { pollDivObj = document.getElementById('Box_'+stnBox+'_Inner_Div'); if(xmlHTTP.responseText!='') { try { eval(xmlHTTP.responseText); } catch (e) { pollDivObj.innerHTML = oldPollInfo; return false; } if(isError) { pollDivObj.innerHTML = oldPollInfo; alert(displayMsg); return; } pollDivObj.innerHTML = ''; pollDivObj.innerHTML = displayMsg; } }