Lightweight JavaScript
|
|
Activity:
Question posted: 05 13 2008 00:09:38 +0000,
1 answers, 2208 views, last activity
07 06 2010 20:18:08 +0000
|
|
|
|
It is not possible to access files on a person's computer using Javascript through a Web browser, or to read the properties of files. It would be a serious security and privacy hazard if Javascript code in a Web page could read files on your computer because the information could be sent back to the site via a form or other mechanisms. For these reasons the possibility of file access was excluded when the Javascript language was designed.
Other client side solutions such as ActiveX and Java applets require special security consent from the user, which many people are reluctant to grant, and only make the job more complicated and risky from their point of view. Not all Web browsers are configured to support ActiveX or Java.
The only effective way to check the size of a file for upload is on the server side. Your server side form handler must process the file and this is the best place to apply a limit to the number of bytes you will accept.
A: It is not possible to create files on the client's computer using Javascript. This type of action is excluded from the Javascript language because it would be a serious security hazard. The only form of local file storage available through Javascript is cookies, whose behaviour and contents are strictly prescribed.
Of course it is possible to use Javascript to generate file content in a Web browser window and invite people to save the contents. Internet Explorer and Firefox users can use the File menu Save as... option directly, but Opera and other browser users may have to copy the text into another application to save it.
|
|
|
|
|
|
|
|
|
|
|
|
Really this is just using solar as a heat source - mass produced nuclear power is a much cheaper heat source so for a large scale operation. As a small scale unit in remote and off the grid places, it'd be a great source of fuel. The most important... |
Only a life lived for others is a life worthwhile - Albert einstein Life it is as simple as that........ |
Kavitha here is an update for 3G: 3G services was announced in India a month ago but we shall see more delays in the launch, as 3G vendors still haven’t placed orders for equipments. “Bharti and Vodafone have calculated their infrastructure requirement... |