В Microsoft Web Browsere на событии clicked нужно отловить ID строки, на которой нажали (не порядковый номер, а номер из колонки "ID").
Этот номер прописан здесь (см. код файла html): <td>456</td> или здесь: onclick="openPopUp('456');"
При нажатии срабатывает функция "openPopUp", которая открывает линк В БРАУЗЕРЕ ИНТЕРНЕТ ЭКСПЛОРЕРА, а не в Microsoft Web Browsere. Т.е. поймать в PowerBuildere линк, который строит эта функция не получается.
Вот код, который выдает значение из "style" (см. в w_web):
1.
This.Object.Document.ActiveElement.style
Но у меня не получается получить данные из "onclick".
Прикреплен пример окошка и файла html.
Файл 111.html нужно кинуть в корень диска "C".
Как поймать этот номер?
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
$PBExportHeader$w_web.srw
forward
global type w_web from window
end type
type ole_1 from olecustomcontrol within w_web
end type
end forward
global type w_web from window
integer width = 2235
integer height = 1976
boolean titlebar = true
string title = ""
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
ole_1 ole_1
end type
global w_web w_web
on w_web.create
this.ole_1=create ole_1
this.Control[]={this.ole_1}
end on
on w_web.destroy
destroy(this.ole_1)
end on
event open;ole_1.Object.Navigate('C:\111.html')
end event
type ole_1 from olecustomcontrol within w_web
event statustextchange ( string text )
event progresschange ( long progress, long progressmax )
event commandstatechange ( long command, boolean enable )
event downloadbegin ( )
event downloadcomplete ( )
event titlechange ( string text )
event propertychange ( string szproperty )
event beforenavigate2 ( oleobject pdisp, any url, any flags, any targetframename, any postdata, any headers, ref boolean cancel )
event newwindow2 ( ref oleobject ppdisp, ref boolean cancel )
event navigatecomplete2 ( oleobject pdisp, any url )
event documentcomplete ( oleobject pdisp, any url )
event onquit ( )
event onvisible ( boolean ocx_visible )
event ontoolbar ( boolean toolbar )
event onmenubar ( boolean menubar )
event onstatusbar ( boolean statusbar )
event onfullscreen ( boolean fullscreen )
event ontheatermode ( boolean theatermode )
event windowsetresizable ( boolean resizable )
event windowsetleft ( long left )
event windowsettop ( long top )
event windowsetwidth ( long ocx_width )
event windowsetheight ( long ocx_height )
event windowclosing ( boolean ischildwindow, ref boolean cancel )
event clienttohostwindow ( ref long cx, ref long cy )
event setsecurelockicon ( long securelockicon )
event filedownload ( boolean activedocument, ref boolean cancel )
event navigateerror ( oleobject pdisp, any url, any frame, any statuscode, ref boolean cancel )
event printtemplateinstantiation ( oleobject pdisp )
event printtemplateteardown ( oleobject pdisp )
event updatepagestatus ( oleobject pdisp, any npage, any fdone )
event privacyimpactedstatechange ( boolean bimpacted )
event setphishingfilterstatus ( long phishingfilterstatus )
event newprocess ( long lcauseflag, oleobject pwb2, ref boolean cancel )
event redirectxdomainblocked ( oleobject pdisp, any starturl, any redirecturl, any frame, any statuscode )
event beforescriptexecute ( oleobject pdispwindow )
integer x = 37
integer y = 28
integer width = 2130
integer height = 1792
integer taborder = 20
borderstyle borderstyle = stylelowered!
boolean focusrectangle = false
string binarykey = "w_web.win"
integer textsize = -26502
integer weight = 700
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
boolean italic = true
long textcolor = 33554432
end type
event clicked;string ls_url = ""
oleobject ole_ilink
ole_ilink = This.Object.Document.ActiveElement
IF NOT IsNull(ole_ilink) THEN
ls_url = Lower( string( This.Object.Document.ActiveElement.onclick))
ls_url = Lower( string( This.Object.Document.ActiveElement.style))
//ls_url = Lower( string( This.Object.Document.ActiveElement.href))
ls_url = Lower( string( ole_ilink.GetAttribute("onclick")))
END IF
end event