Click to See Complete Forum and Search --> : Upload Status nightmares :(


mcmcom
March 21st, 2006, 12:46 PM
:thumbd: Hi all,

i am allowing users to upload files and when they press the "upload" button i want a label, or something to just popup right before the file starts uploading. I've treid Javascript to set labels visible, and i've tried Server side things, like panels, etc. Everything (obviouslly) requires a postback at very least to display something before the upload must start, but i have not been able to figure out a way to order my functions properly to get this to work.

I need some alternatives for my file upload and am begging for some advice.

basically all i want to do is:

1) display something to the user, a <DIV> Tag becoming visible is ideal because it would not require a popup, just some very simple js.

2) after thats displayed, upload the httpPostedFile.

but how can i do that when IsPostBack fires before any button event?!?!

thanks

HairyMonkeyMan
March 22nd, 2006, 04:20 AM
Not sure I totally understand your problem.. As far as I understand it - IsPostBack is not an event in itself, rather a boolean value set in the Page class.

Surely, your page is going to postback when you click your upload button? Could you not just set the label/Div (whatever) visible = true when the upload button is pressed?

Regards

mcmcom
March 22nd, 2006, 10:36 AM
hi

managed to get a div to show before the page starts the upload. heres my workaround:

1) dont use a server control, use a normal input button.
2) on the SERVER CLICK event of the button point it to the Protected Upload Method
3) on the Press or click event of the button (client side) run JS to display a div or something while its uploading.

Now this works fine, but as i said i am looking for a progress control, status bar or somethign that will appear in an iframe. This requires either intercepting the HttpRequests or targeting a new frame with the post of the form to (hopefully) send the session to a new page which will use Js SetTimeout to refresh itself

mcm