phparmy Posted August 7, 2007 Share Posted August 7, 2007 Iam using Xajax. How can i get file size before uploading file. Quote Link to comment Share on other sites More sharing options...
jitesh Posted August 7, 2007 Share Posted August 7, 2007 Try javascript to get file size function A() { var oas = new ActiveXObject("Scripting.FileSystemObject"); var d = document.a.b.value; var e = oas.getFile(d); var f = e.size; alert(f + " bytes"); } </script> </head> <body> <form name="a"> <input type="file" name="b"> <input type="button" name="c" value="SIZE" onClick="A();"> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted August 7, 2007 Share Posted August 7, 2007 This section is actually php help but okay. http://www.ajaxfreaks.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.