There is no geniune problem with the code the problem is with internet explorer browser security settings.
Generally you face this type of error when you want to open a text file or some excel files on a remote server
you can remove the problem but that's not highly appreciated ,try to do the following and i think your error will be removed
go to internetoptions<security<customlevel<initialize and script active x controls not marked safe for scripting and mark them enabled and i think your problem will be removed
Beni
That advice should come with with a "You are putting your computer at serious risk" health warning. My advice is don't do this, that security setting is there for a very good reason.
Sudheer, do you want client side browser host javascript to read a local file? If so why? Can you re-design to avoid it? The only way to do this is to use the above advice. IMO opinion the risks are to high even for personal use and its not something you can ask users to do.
Anthony Jones - MVP ASP/ASP.NET