Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Check file size with Javascript before uploading

 
satheesh subramani
Greenhorn
Posts: 29
Fedora Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


this code is not working, i click the size button nothing is happen i checked ActiveXObject is not working
i am using IE
what is the reason for this
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of IE are we talking here: IE6, IE7, IE8, IE9
Is there an error message?
Do you have ActiveX enabled since this is a security risk accessing the file system?

Eric
 
anirudh jagithyala
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey satheesh,
I tried your code and it did not run in firefox in the begining, later i tried it in internet explorer which asked me to allow the Active X controller to run...
once i allowed the activeX controller in IE and then selected a file i got some output of 13 bytes...

Your code works fine.......

Try to enable the ActivX controller
 
satheesh subramani
Greenhorn
Posts: 29
Fedora Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi anirudh

i try to enable the activex control for the following steps

Open Internet Explorer
Select Tools
Select Internet Options. Internet Options window should open up.
Select Security tab.
Select "Custom Level" button. The Security Settings window should open up.
Find the "Download signed ActiveX controls" from the list that appears and select "Prompt" radio button.
Find the "Run ActiveX controls and plugins" in the list and select "Enable" radio button.
Click on OK button twice to save changes
Close Internet Explorer and open it again.


but it not working i click the size button, in status bar of IE shows error on page
i am getting the error automation server can't create object

 
anirudh jagithyala
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try to use some other upgraded IE like IE6,IE7 etc...
which IE are you using....?
 
satheesh subramani
Greenhorn
Posts: 29
Fedora Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IE 7
 
anirudh jagithyala
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to experiment with other options in the security tab....
Mostly this error would be due to "Initializing and Script Activex controls not marked as safe"-----

if that doen't work try out this

http://forums.devx.com/showthread.php?threadid=5092
 
satheesh subramani
Greenhorn
Posts: 29
Fedora Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any other method to find the file size before uploading

i think this method is not efficient because we check the system whenever the application is running
so suggest any other method with in application
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
satheesh subramani wrote:i am getting the error automation server can't create object


That error normally means your security settings are set too high still.

BUT just think, if you are having this much trouble, imagine what your users are going to go through. It is not worth it.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic