/******************************************************************************************************************/ function popUp(e){ if(!(bw.ns4||bw.ns5)){ e = window.event popUp=e.srcElement.field.mandatoryPopUp x=e.clientX-popUp.getWidth()-5 y=e.clientY-popUp.getHeight()-5+document.body.scrollTop }else{ popUp=e.target.field.mandatoryPopUp x=e.pageX-popUp.getWidth()-5 y=e.pageY-popUp.getHeight()-5 } popUp.moveTo(x,y) popUp.show() } /******************************************************************************************************************/ function popOut(e){ if(!(bw.ns4||bw.ns5)){ e = window.event popUp=e.srcElement.field.mandatoryPopUp }else{ popUp=e.target.field.mandatoryPopUp } popUp.hide() } /******************************************************************************************************************/ function popUpHint(e){ if(!(bw.ns4||bw.ns5)){ e = window.event popUp=e.srcElement.field.hintPopUp x=e.clientX-popUp.getWidth()-5 y=e.clientY-popUp.getHeight()-5+document.body.scrollTop }else{ popUp=e.target.field.hintPopUp x=e.pageX-popUp.getWidth()-5 y=e.pageY-popUp.getHeight()-5 } popUp.moveTo(x,y) popUp.show() } /******************************************************************************************************************/ function popOutHint(e){ if(!(bw.ns4||bw.ns5)){ e = window.event popUp=e.srcElement.field.hintPopUp }else{ popUp=e.target.field.hintPopUp } popUp.hide() } /******************************************************************************************************************/ function generatePopUp(imgName,popUpDef){ eval('var '+imgName+" = new DynEl( {window:window,id:'testLayer',bgColor:'pink',left:400,top:20,body:'test'})" ); eval(imgName+'.output()') } /******************************************************************************************************************/ function generateQuickPollResults(quickPoll){ html = '' QuickPollFields = quickPoll.questions for(var i=0;i max){ max = value[j]} } for(var j = 0;j 0){ html += barStartQPR + percentMax + barEndQPR + spaceBarQPR }else{ html += noVotesQPR + spaceBarQPR } } //html += outerTableEndQPR //if(QuickPollFields[i].count){ // html += includeVotedCount?countStartQPR + QuickPollFields[i].count + " " // + votedTranslation + countEndQPR:"" //} } //Total votes. Not specific translation. html += includeVotedCount?countStartQPR + quickPoll.submittedCount + " " + votedTranslation + countEndQPR:"" html += outerTableEndQPR return html; } /******************************************************************************************************************/ function getXMLValue(tag,str){ return (str.slice(str.indexOf('<'+tag+'>'))).split('')[0].replace(/<\/?\w*>/g,""); } /******************************************************************************************************************/ function getForm(formName){ formAliasField = eval(formName+"AllFields.getObj('name','FormAliasTX')"); f = eval(formAliasField.docPath+'document.forms'); form = null; for(var i=0;i' html += '' html += '' html += '' html += '' html += '' return(html) } /******************************************************************************************************************/ function writeFormHTML(fieldArray,doc){ if (navigator.appName.indexOf("Netscape") != -1) { docPath='window.'+'document.'+doc.layers[0].parentLayer.id+'.'; }else{ docPath=""; } formName = fieldArray[0].formName //alert(formName); var postTo=eval(formName+'PostTo') var design=eval(eval(formName+'Design')) var formType=eval(formName+'FormType') //alert(formType); var profileHeaderWritten = new Array() postTo = postTo.slice(0,-1)+ ' onSubmit="return submitForm(\''+formName+'\')">' formOtherValues = fieldArray.getObj("name","FormAliasTX").otherValues var html = '' if(formType == 'PROFILE_EDIT'){ html += genRemoveProfileForm(fieldArray); } html += postTo + design.formStart + '\n'; var last=false; for(i=0;i':'' confirmMessage=profHead.confirmMessage?'\''+profHead.confirmMessage+'\'':true removeProfile='' +'' +removeProfileText+pictureRemoveProfile+'' }else{ removeProfile='' } // --- Generate profile header html += '' +'' +removeProfile+'
'+profHead.header+'
' profileHeaderWritten[profileHeaderWritten.length] = profHead.header } // --- END: Generate Header // --- START: Setting the mandatory column --- mandatory='' if(fieldArray[i].mandatory){ if(formOtherValues&&formOtherValues.pictureMandatory!=''&&formOtherValues.pictureMandatory!=null){ imgName='image'+fieldArray[i].name+fieldArray[i].position; mandatory+='' fieldArray[i].mandatoryPicture= {dPath:'',name:''} fieldArray[i].mandatoryPicture.name = imgName fieldArray[i].mandatoryPicture.dPath = docPath }else{ mandatory+='*' } } if(fieldArray[i].hintPopUp&&(formOtherValues&&formOtherValues.pictureHint!=''&&formOtherValues.pictureHint!=null)){ imgName='hintImage'+fieldArray[i].name+fieldArray[i].position; mandatory+='' fieldArray[i].hintPicture = {dPath:'',name:''} fieldArray[i].hintPicture.name = imgName fieldArray[i].hintPicture.dPath = docPath } // --- END: Setting the mandatory column --- fieldArray[i].docPath = docPath; if(fieldArray[i].alias!=null && fieldArray[i].alias.slice(-7)==''){ html += design.descriptionStart + fieldArray[i].description + design.descriptionEnd html += design.mandatoryStart+mandatory+design.mandatoryEnd html += design.inputFieldStart + fieldArray[i].generateFieldHTML() last = true; }else if(last){ html += '   ' + fieldArray[i].generateFieldHTML() + design.inputFieldEnd last = false }else if(fieldArray[i].type=="Hidden"||fieldArray[i].hidden){ html+=fieldArray[i].generateFieldHTML(); }else{ html += design.descriptionStart + fieldArray[i].description + design.descriptionEnd html += design.mandatoryStart+mandatory+design.mandatoryEnd html += design.inputFieldStart + fieldArray[i].generateFieldHTML() + design.inputFieldEnd } } if(formOtherValues!=null){ submitValue=formOtherValues.submit resetValue=formOtherValues.reset } if(submitValue==null||submitValue==''){ submitValue='Submit' } if(resetValue==''){ resetValue='Reset' } //'Submit' and 'Reset' buttons html+=design.submitButtonStart + '  ' +(resetValue==null?'':('')) +design.submitButtonEnd+design.formEnd // --- START: QuickPoll Design --- if(formType=='QUICKPOLL'){ formAlias = fieldArray.getObj('name','FormAliasTX').defaultValue if(submittedQuickPolls){ subQuickPollsArray = submittedQuickPolls.split('~') }else{ subQuickPollsArray = new Array() } htmlNotSet=true for(var j=0;j