//alert actions/errors //OPEN A WINDOW: function openWin(winurl,winname,winwidth,winheight) { var winl = (screen.width - winwidth) / 2; var wint = (screen.height - winheight) / 2; //winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl //alert("Opening a new window with the following properties:\nURL: "+winurl+"\nWindow Name: "+winname+"\nWindow Width: "+winwidth+"\nWindow Height: "+winheight) window.open(winurl,winname,"width="+winwidth+",height="+winheight+",top="+wint+",left="+winl+",location=no,menubar=no,directories=no,toolbar=no,status=no,titlebar=no,resizable=yes,scrollbars=yes,modal=yes,dialog=yes,minimizable=no"); //return false; } function addOther(ddVal,ddId,promptMsg,promptDefault) { //this function detects a comment type of "other" and allows the user to specify a custom comment type via a prompt //alert("TESTING!\n\nYou selected: "+commentType); if (ddVal=="other") { comTypeObj=ddId; noOptions=comTypeObj.length; //alert("noOptions: "+noOptions); thisItemNo=comTypeObj.selectedIndex; //alert("Selected Index: "+thisItemNo); var newVal = prompt(promptMsg,promptDefault); //var newVal=myPrompt(32,"Please enter a custom TYPE name for this comment, e.g:","Urgent!"); //alert("New Type: "+newType); //alert("myPromptVal:"+myPromptVal); if (newVal!="" && newVal!=null) { //comTypeObj.add(newType); //var theSel = document.getElementById('selOriginalWindow'); var newOpt = new Option(newVal, newVal); var selLength = comTypeObj.length; comTypeObj.options[selLength] = newOpt; comTypeObj.selectedIndex=noOptions; } else if (newType==null) { //alert("You decided to cancel!"); comTypeObj.selectedIndex=0 } else { alert("You have not entered anything!\n\"Other\" will be used unless you select another option from the drop down"); } } }