A kind of method and system of browsing the Web webpage by ActiveX control continuously
Technical field
The present invention relates to a kind of Web browser method, relate in particular to and a kind ofly browse the method and system of WEB webpage continuously, belong to the WEB technical field by ActiveX control.
Background technology
B/S structure (Browser/Server, browser/server pattern) is a kind of network structure pattern after WEB rises, and the WEB browser is the topmost application software of client.It is the rise along with the Internet technology, and to a kind of variation or the improved structure of C/S structure (being Client), B/S structure biggest advantage is exactly can operate anywhere and any special software need not be installed.
ActiveX is a Microsoft(MS) for the address of a series of tactic object-oriented program technology and instrument, wherein major technology is The Component Object Model (COM).
CTI (Computer Telephony Integration) is called as computer telephone integration, comes management of telephone call with computing machine, is meant computerized call center.
In the B/S framework, only can't realize the operation that continues of WEB mode by http protocol, this will be unfavorable for supporting the whole enterprise professional skill, and influences user's surfing.
Therefore, be necessary to develop a kind of method and system that can browse the Web webpage continuously, to satisfy current needs.
Summary of the invention
The present invention is directed to the deficiencies in the prior art, provide a kind of through the visit Web page just can be directly and call center's foundation converse, browse the method and system of Web webpage continuously apace, promptly browse the method and system of WEB webpage continuously by ActiveX control, can browse quickly and easily with the realization client, and promote the whole enterprise service level.
The technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind ofly browse the method for Web webpage continuously by ActiveX control, may further comprise the steps:
1) the Web page loads ActiveX control, after the ActiveX control initialization logs on, creates the event handling thread, and described ActiveX control is packaged with the interface function and the incident of CTI platform hardware;
2) interface communication of described ActiveX control and CTI platform, described CTI platform trigger event, and described Event triggered to the Web page;
3) after the incident that Web page reception ActiveX control sends, in this incident, carry out business processing
On the basis of technique scheme, the present invention can also do following improvement.
Further, the Web page in the described step 1) loads ActiveX control by Javascript.
Further, described step 2) be specially, described ActiveX control is by the interface communication of ICDCOMM and CTI platform, and described CTI platform triggers described incident, and by Javascript described Event triggered to the Web page.
Further, described step 2) ActiveX control in is by the Sink object of IDispatch interface interchange client, and by the IDispatch interface for extraneous client call.
Further, in step 3), described incident is carried out thread process by ActiveX control and Sink object.
Further, described ActiveX control and Sink object are present in same set of.
Further, described same set of is the STA inner room.
The another technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind ofly browses the system of Web webpage continuously, comprises Web web page server, ActiveX control and CTI platform by ActiveX control,
Described Web web page server is in order to issue Web webpage, and loads ActiveX control at the Web webpage by Javascript, and feeds described incident to ActiveX control;
Described ActiveX control is by ICDCOMM and the communication of CTI platform;
Described CTI platform by javascript with described Event triggered to the Web webpage.
The invention has the beneficial effects as follows: the interface function and the incident of encapsulation call center hardware in ActiveX control, carry out communication by ActiveX control and call center CTI platform, raise with above-mentioned ActiveX control at webpage and realize that the web page shows the spare time, show busy, log on, check out, on-hook discharges, internal help request, the request calling, quiet, cancel quiet, password authentification, two-stage dialing, incoming-call-reply, Three-Way Calling, breathe out, conversation keeps; go bail for and hold; calling transfer; the people answers; answer certainly; audit; insert; interception; force idle; force busy; feature operation and event response such as force to logout; Thereby can pass through the continuous fast browsing of the Web page, on the website of an enterprise, browse, in the time of the needs more information, not need any extra action, only need one click just can set up contact, begin real-time interchange with the telephonist; From enterprise's angle, the continuing of WEB mode helps the integration of various B/S system, only need the page integrated, just Enterprise Resource can be presented in this channel of call center to greatest extent, help enterprise and the tight of client contacts, whole enterprise business support level is provided.
Description of drawings
Fig. 1 is a synoptic diagram of browsing the method for Web webpage by ActiveX control continuously of the present invention;
Fig. 2 is a system of browsing the Web webpage by ActiveX control continuously of the present invention.
Embodiment
Below in conjunction with accompanying drawing principle of the present invention and feature are described, institute gives an actual example and only is used to explain the present invention, is not to be used to limit scope of the present invention.
As shown in Figure 1, the embodiment of the invention is described browses the method for Web webpage continuously by ActiveX control, may further comprise the steps:
1) use label<OBJECT in the Web page〉the loading control, obtain ActiveX control by document.getElemnetById, in javascript by var ret=Phone.SignInEx (' TFF', this.agentType, this.sign_phone_no) this mode is called the method for control, Phone is exactly the control object of obtaining by document.getElementById, described ActiveX control is packaged with the interface function and the incident of call center's hardware, after the ActiveX control initialization logs on, meeting calling platform interface CccAgentLoginEx method in the SignInEx of ActiveX control method, simultaneously when control invokes logs on, (application program is by calling the call back function that this function is provided with a processing events to begin to call InstallEventCallBackProc event call-back function, when receiving incident, automatically call this call back function), promptly create the event handling thread;
2) described ActiveX control calls the Sink object of client by the method IDispatch outgoing interface consistent with attribute, and pass through the IDispatch outgoing interface for extraneous client call, described ActiveX control and Sink object carry out thread process to described incident again, described ActiveX control is again by ICDCOMM and the communication of CTI platform, import the function S endEvent of processing events into, incident is joined in the formation, start thread EventFireThread simultaneously, call EventPrc by EventEngine, the CTI platform is according to different EventType, trigger different incidents, the CTI platform by Javascript with described Event triggered to the Web page, described javascript the inside similar following code:<script for=" Phone " event=" OnSignInExSuccess (MediaServer) "〉carry out the processing of described incident;
Described Sink object is the same with ActiveX control also to be a kind of com object, and the js code of defined various ActiveX incidents is exactly the method for Sink object in IE specifically, and IE is inner can to set up corresponding Sink object for different ActiveX objects.ActiveX control and Sink generally only are present in the same STA inner room liking a kind of in-process assembly.Described inner room is exactly the notion of thread, that is to say that the code of Sink object and ActiveX control can only be carried out in the thread of setting up the object place, carries out and can not cross over thread, otherwise will occur unusual.
Described Sink object is realized its row collection and the collection that looses by the IGlobalInterfaceTable interface.Just can realize crossing over the method for inner room and having called of incident by the row collection and the collection that looses.We have increased an incident and have excited the inner room thread in realization, this thread is responsible for specially and is carried out exciting of JS incident.Excite thread and event object not to belong to same thread here.And incident excites thread still allow can directly to call JS incident function, and this is because set up agent object and object stub by the row collection and the collection that looses in the middle of this.Agent object and object stub carry out remote procedure call by RPC.
3) after the incident that Web page reception ActiveX control sends, carry out described incident again, promptly in this incident, carry out business processing; The incident of carrying out comprises shows the spare time, show busy, log on, check out, on-hook discharges, internal help request, the request calling, quiet, cancel quiet, password authentification, two-stage dialing, incoming-call-reply, Three-Way Calling, breathe out, conversation keeps; go bail for and hold; calling transfer; the people answers; answer certainly; audit; insert; interception; force idle; force busy; force to logout and wait feature operation and event response; the different event according to reception is carried out different processing; thus can pass through the continuous fast browsing of the Web page; on the website of an enterprise, browse; in the time of the needs more information; do not need any extra action; only need one click just can set up contact, begin real-time interchange with the telephonist.
As shown in Figure 2, the embodiment of the invention is described browses the system of Web webpage continuously by ActiveX control, it is characterized in that, comprises Web web page server, ActiveX control and CTI platform,
Described Web web page server is in order to issue Web webpage, and loads ActiveX control at the Web webpage, and feeds described incident to ActiveX control;
Described ActiveX control is by ICDCOMM and the communication of CTI platform;
Described CTI platform by javascript with described Event triggered to the Web webpage.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.