var pedlrIframe = true; // prevents the iframe from busting out of its chains function dispSpinner(uploadField){ // Set up the code for the message displayed while the user is waiting. var fileName = uploadField.value; if(fileName.lastIndexOf("/") != -1){ fileName = fileName.substring(fileName.lastIndexOf("/")+1); } if(fileName.lastIndexOf("\\") != -1){ fileName = fileName.substring(fileName.lastIndexOf("\\")+1); } var MAX_LEN = 15; if(fileName.length > MAX_LEN){ fileName = fileName.substring(0, (MAX_LEN-1)); } // Change the display and send the form. var formObj = $(uploadField).parent('form'); var wrapper = $(formObj).parent('div.uploadFormWrapper'); $(formObj).toggle(); $('.uploadingMsg', wrapper).html(" Uploading "+fileName+"..."); $('.uploading', wrapper).toggle(); return true; }