1. Field of the Invention
The invention relates to a method and an electronic device that allows an HTML document to access local system resources, and an HTML document that is able to access local system resources.
2. Description of the Related Art
Hypertext markup language (HTML) is used on the World Wide Web (WWW). In a web document, HTML utilizes tags to define the page layout, fonts and graphic elements, so that a web browser knows how to display a web document to a user. HTML also utilizes tags or codes to inform a web browser how to response to a user's actions. For example, HTML provides hypertext links to other documents on the Web. Each link contains a uniform resource locator (URL), or address, of a Web page residing on the same server or any server worldwide. When a user clicks the hypertext link on an HTML document, the browser links to another web page or document as specified in the hypertext link.
Along with the developments of computer and network technologies, HTML documents are no more than static documents. Utilizing DHTML (dynamic HTML) and applets, HTML documents are able to interactive with the users or to create various dynamic effects. For instance, a DHTML document can provide a text box. A user can type text in the text box, and click a button, which is also provided by the DHTML document, to send the text to a remote server.
However, for security concerns, HTML documents are not authorized to access local system resources. For example, to protect the data stored in a local computer from being destroyed, an HTML document downloaded form a remote computer is not allowed to access data stored in the local computer.
To further enhance the capability of an HTML document and the services provided by a WWW server, nowadays an HTML document can access local system resources through a certified ActiveX control object. An ActiveX control object can be embedded in an HTML document. After requesting the user to trust the certificate issued to the ActiveX control object, the HTML document can access local system resources to store data temporarily in a local computer for later accessing or to install a program in the local computer through the ActiveX control object.
Although the ActiveX technology allows an HTML document to access local system resources, it still has disadvantages. For example, an ActiveX control object requires an additional certification procedure, which is inconvenient to both the user and the HTML document drafter and designer. Moreover, since an ActiveX control object operates independently after being downloaded to a local computer, it would never act like an application program interface (API) layer for the HTML document. Therefore, it is hard for an ActiveX control object to have the capability to cross platform.