I have a control for uploading an image and above it is an image control. When User clicks 'Upload' button, image turns to an animated image displaying 'WAIT' message, after the image is uploaded, the image source changes to that image. I want to do this using simple AJAX, JAVASCRIPT (xmlHTTP objects) , ASP.NET, VB.NET. Can anyone help me out??? Don't wanna use iframe or flash besides above four.
A:
for security reasons javascript/ajax can't access your local drive which is why this is limited to input file control or flash.. im afraid iframe or flash are your only choices.
there is also asp.net UpdatePanel which may be reliable enough for your needs..
Sonic Soul
2010-06-13 19:02:37
but what if i'm using a file control i.e. type=file tag??isn't there a way by which i can embed a file from the control to the Request object which i'm creating in the ajax code???
farjimain
2010-06-14 06:51:58
i'd be curious to hear if you figure out a way to do this.. but iframe was the best i could do in the past.. however, why don't you give updatepanel a shot.. i wouldn't recommend it for anything complex, but wrapping just a file upload tag in updatePanel might be doable reliably across all browsers.
Sonic Soul
2010-06-14 12:03:20