No progress window is shown
I have entered an progress window with Pure Upload, the file uploads fine, but no progress window is shown. I use Pure Upload in a form with PD Online HTML Editor.
Answer:
The progress window is called with an JavaScript funtion on the onSubmit of the form, some other extension like pd_edit add there own submit button. This is not an real submit button, here is the tag of such an button:
<input name="Button" type="button" class="contentbody" onclick="OnFormSubmit()" value="Save">
The button calls the function OnFormSubmit. The code for this function is:
function OnFormSubmit(){
if(confirm("This Document is about to be submitted\nAre you sure you have finished editing?")){
copyValue();
document.fHtmlEditor.submit();
}
}
The Pure Upload adds something like the following to the form tag:
onSubmit="checkFileUpload(this,'',true,'','','','','','','');showProgressWindow('showProgress.htm',300,100);return document.MM_returnValue"
If you have Submit the form now, the function OnFormSubmit function is called and submits the page, the onSubmit in the form tag is ignored. To get it to work correctly you need to do the following:
Solution
1. Change the button in a real Submit button like:
<input name="Button" type="Submit" class="contentbody" value="Save">
2. Find document.fHtmlEditor.submit(); and delete this line.
3. In the form tag edit the onSubmit, you need to add the OnFormSubmit from pd_edit in here, it should get something like:
onSubmit="OnFormSubmit();checkFileUpload(this,'',true,'','','','','','','');showProgressWindow('showProgress.htm',300,100);return document.MM_returnValue"
Comments
Be the first to write a comment
You must me logged in to write a comment.