rascal
asked on
How to do an AJAX file upload in ASP?
Hi Experts,
I've always coded file uploads using FreeAspUpload in a separate popup window, but would like to explore using Ajax instead.
Is this even possible? I've seen ajax upload tools but they're all ASP.NET and I'm looking for just pure ASP.
I've versed in Ajax and JQuery.
I've always coded file uploads using FreeAspUpload in a separate popup window, but would like to explore using Ajax instead.
Is this even possible? I've seen ajax upload tools but they're all ASP.NET and I'm looking for just pure ASP.
I've versed in Ajax and JQuery.
do you have the server side code?
ASKER
Yes, I have the server side ASP code - it is FreeAspUpload. (see attached and rename to .asp) freeASPUpload.txt
OK, your answers are here, click on the examples and on the File uploads tab : http://jquery.malsup.com/form/#file-upload
so basically to post a form using the plugin, here a basic page :
so basically to post a form using the plugin, here a basic page :
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js"></script>
<script type="text/javascript" src="jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#uploadForm').ajaxForm({ "success": function() { alert("file successfully uploaded !"); } });
});
</script>
</head>
<body>
<form id="uploadForm" action="files.php" method="POST" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" value="Submit">
</form>
</body>
</html>
ASKER
Thanks, but your solution is PHP based (see the action=files.php in your example) which our web server doesn't support. We need a completely 100% ASP solution.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great, thanks leakim!