File name cleared in dynamic NeatUpload

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

File name cleared in dynamic NeatUpload

Phil Stapleton

I have a NeatUpload control that I create dynamically in the page.init event.

On the browser page I enter a value in the InputFile control and click my submit button, and the value I have entered is accessible in the client-side validation event though document.getElementById(id).value

After this event the value disappears from the displayed web page and the server-side validation event fires. Here both .fileName and .validationFileName are empty.

I just set the ID and size when I create the control - do I need to set other parameters or hook up any events to make sure the fileName gets sent to the server?

 

As a second issue, what happens if the file path is invalid?

Reply | Threaded
Open this post in threaded view
|

Re: File name cleared in dynamic NeatUpload

Dean Brettle
Administrator
NeatUpload will clear InputFile and MultiFile controls if you have specified a trigger for the ProgressBar control and you submit the form using something other than the trigger.  Could that be what is going on?   For details, see Avoiding Unnecessary Uploads and Progress Displays.

The behavior when the file path is invalid is browser-dependent.  For example, see Handling Non-absolute Paths in IE6.  That might apply to more recent IE versions as well.

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

Re: File name cleared in dynamic NeatUpload

Guest-937

Thanks Dean

The trigger was a reference to a control on the Master Page. I changed to using progressbar1.addtrigger(ctl) in the page Init event and it works OK