Method and system for injecting code to conditionally incorporate a user interface component in an HTML document
Abstract
A method and system for injecting code into an existing HTML document that enables the conditional generation and incorporation of an injectable component is provided. The injection mechanism provided enables a user to display an add-on user interface component within a web page using a technique that is transparent to the normal processing within a browser application. The injection mechanism installs interceptor code as a proxy server between a client browser and a server. The interceptor code monitors all HTTP messages sent from the client browser and injects code into each HTML document that is sent from a server to the client browser. The injected code when executed by the client browser conditionally inserts HTML code into the received HTML document. The inserted HTML code is then used by the client browser to generate a new component, for example a user interface component. The code injected by the interceptor code is dependent upon the type of the browser and whether certain tags are present in the received HTML document. In addition, the code may be written in a script language, such as Javascript or VBscript.
Claims
exact text as granted — not AI-modified1 . A method in a computer system for injecting code into an HTML document to conditionally generate a user interface component when processing the HTML document, the method comprising:
under control of browser code,
installing interceptor code as a proxy server; and
sending a request for the HTML document to the interceptor code installed as the proxy server;
under control of the interceptor code installed as the proxy server,
receiving the request for the HTML document;
forwarding the received request to a specified server;
upon receiving a response that includes the requested HTML document, injecting code into the received HTML document thereby creating a modified HTML document, wherein the stored code, when executed, conditionally generates additional code; and
forwarding to the browser code the received response that includes the modified HTML document; and
under control of the browser code,
upon receiving the response that includes the modified HTML document, executing the code injected in the modified HTML document such that, when a certain condition is met, additional code is inserted into the modified HTML document; and
when processing the modified HTML document, using the inserted additional code to generate the user interface component.
2 . The method of claim 1 wherein the processing of the HTML document comprises displaying the HTML document.
3 . The method of claim 1 wherein the certain condition depends upon whether the user interface component is already displayed.
4 . The method of claim 3 wherein a determination of whether the user interface component is already displayed is performed by determining whether there is only one frame currently being displayed.
5 . The method of claim 1 wherein the inserted additional code comprises HTML tags that are used to create an Active-X component.
6 . The method of claim 1 wherein the inserted additional code comprises HTML tags that are used to create a plug-in component.
7 . The method of claim 1 wherein the injected code is a script.
8 . The method of claim 7 wherein the script is written in Javascript.
9 . The method of claim 7 wherein the script is written in VBscript.
10 . The method of claim 1 wherein the using of the inserted additional code to generate the user interface component further comprises:
instantiating an object specified by the additional code;
determining from a class registry an indicator of code to implement the behavior of the instantiated object; and
loading and executing the code indicated by the determined indicator.
11 . The method of claim 1 wherein the user interface component is specified as an HTML frame.
12 . A method in a computer system for conditionally incorporating an injectable component as part of an HTML document, the method comprising:
installing interceptor code; and under control of the installed interceptor code,
receiving a response to a request for the HTML document; and
injecting code into the received response whereby, when the HTML document is processed, the injected code causes conditional generation of the injectable component and incorporation of the generated component as part of the HTML document.
13 . The method of claim 12 wherein the processing of the HTML document includes displaying the HTML document.
14 . The method of claim 12 wherein the incorporation of the generated component as part of the HTML document comprises displaying the generated component.
15 . The method of claim 12 wherein the HTML document is a WEB page.
16 . The method of claim 12 wherein the injected code is a script.
17 . The method of claim 16 wherein the script is written in the Javascript language.
18 . The method of claim 16 wherein the script is written in the VBscript language.
19 . The method of claim 12 wherein the interceptor code is installed as a proxy server for a browser.
20 . The method of claim 12 wherein the injected code, upon a certain condition, generates HTML tags that are used to generate the injectable component.
21 . The method of claim 20 wherein the certain condition is met when the injectable component is not already displayed.
22 . The method of claim 12 , further comprising periodically updating code that implements the injectable component.
23 . The method of claim 12 , further comprising:
downloading code that implements the injectable component; and wherein the injected code uses the downloaded code to generate and incorporate the injectable component.
24 . The method of claim 23 , further comprising periodically updating the downloaded code.
25 . A WEB page capturing system for injecting code to conditionally generate a component on a WEB page comprising:
an injectable user interface component; an interceptor server that is installed as a proxy server, receives and forwards requests for WEB pages, receives and forwards responses to the requests for WEB pages, and that, upon receiving a response to a request for a WEB page, injects code into the WEB page; and a browser that forwards requests for WEB pages to the interceptor server installed as the proxy server, receives responses that contain WEB pages from the proxy server, and displays the received WEB pages, such that, when a WEB page is received from the proxy server that contains the injected code, the injectable user interface component is generated and displayed transparent to the browser when a certain condition is met, without modifying the implementation of the browser.
26 . The system of claim 25 wherein the injectable user interface component is periodically updated by the interceptor server.
27 . The system of claim 25 wherein the injected code is a script.
28 . The system of claim 27 wherein the script is written in Javascript.
29 . The system of claim 27 wherein the script is written in VBscript.
30 . The system of claim 25 wherein the generation and display of the user interface component is performed by inserting HTML tags into the WEB page when the certain condition is met, the HTML tags being used to generate the user interface component.
31 . The system of claim 25 wherein the certain condition is met when it is determined that the user interface component is not already displayed on the WEB page.
32 . The system of claim 25 wherein the generation and display of the user interface component is performed by inserting a new frameset tag definition into the WEB page when the certain condition is met.
33 . A document injection system comprising:
a user interface component that is downloaded to a client machine; an interceptor code module that is downloaded to the client machine and installed as a proxy server, thereby automatically intercepting HTTP-request and HTTP-response messages between the client machine and a specified server machine, the interceptor code module injecting code into each document that is received in an HTTP-response message; and a browser code module that sends HTTP-request messages and receives HTTP-response messages through the proxy server and that processes documents received in HTTP-response messages, whereby, when the browser code module executes the injected code as part of processing a received document, additional code is conditionally inserted into the received document that, when executed, is used to automatically generate an instance of the downloaded user interface component.
34 . The system of claim 33 wherein the processing of the document involves displaying the document.
35 . The system of claim 33 , further comprising displaying the automatically generated user interface component instance when the additional code is executed.
36 . The system of claim 33 wherein the downloaded user interface component is periodically updated by the interceptor code module so that an updated user interface component is conditionally generated.
37 . The system of claim 33 wherein the document is an HTML document.
38 . The system of claim 33 wherein the injected code is written in a script language.
39 . The system of claim 33 wherein the additional code is used to generate an Active-X component.
40 . The system of claim 33 wherein the additional code is used to generate a plug-in component.
41 . The system of claim 33 wherein the additional code comprises HTML tag statements.Join the waitlist — get patent alerts
Track US2002129064A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.