Javascript error in NeatUpload.js

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Javascript error in NeatUpload.js

Don Adams
Hi, We're using NeatUpload version 1.3.3287.37493 on Windows Server 2008, IIS 7 Integrated pipeline mode, .Net 3.5 SP1, IE 8. NeatUpload works great on our other servers but those are running Windows Server 2003 and IIS 6. We have the NeatUpload control in the same aspx page that we are using on our other servers, but it doesn't work on the Windows Server 2008 machine for some reason. After selecting the file to upload and pressing submit we get the following error: NeatUpload.js Line: 235 Error: Invalid procedure call or argument This works fine locally on my machine with the same setup except for the OS being Windows Vista. The problem source code is in NeatUpload.js: // Hook preventDefault() so we know whether it was called to prevent the upload try { Event.prototype.NeatUpload_OrigPreventDefault = Event.prototype.preventDefault; Event.prototype.preventDefault = function () { this.NeatUpload_PreventDefaultCalled = true; return this.NeatUpload_OrigPreventDefault(); }; this.debugMessage("Hooked preventDefault"); } catch (ex) { this.debugMessage("Could not hook preventDefault: " + ex); } When the page is loaded from the server, the Event object is non-null, but preventDefault is null. So, at line 559 when the hooked preventDefault is called, it has an error since NeatUpload_OrigPreventDefault is null: if (ev) { ev.returnValue = false; if (ev.preventDefault) ev.preventDefault(); } When I run this locally, the Event object is null, so an exception is thrown and a debug message is logged. At line 559, it doesn't try to call ev.PreventDefault since it is null. The file is then uploaded successfully. What is the Event object and who creates it? Any idea why it's non-null on the server but not locally? Any idea why preventDefault is null on the server? I assume some additional checks can be made in the javascript file to not add the hook if preventDefault is null, but I wanted to check to see if this is a known problem. Perhaps this has been fixed in a later release? Thanks for your help, Don Adams
Reply | Threaded
Open this post in threaded view
|

Re: Javascript error in NeatUpload.js

Dean Brettle
Administrator
This was fixed in a more recent release.  Please upgrade.

--Dean
Reply | Threaded
Open this post in threaded view
|

Re: Javascript error in NeatUpload.js

Don Adams
Thanks Dean, that fixed it! I saw where you made the updates in NeatUpload.js - yet another case of browser inconsistencies. Sorry about the formatting of my original post - it looked nice before I posted it and I typed it in the forum editor rather than pasting it from somewhere else. I'm not sure why it got messed up. I hope this one turns out ok! Don