Hello All,
I am trying to use the new Web Browser control to display HTML information in PB2022R3.
I have attached a zip file for the sample application to just open a response window to display HTML
I have tried the scripts below in both the Open event and user-defined 'ue_postopen' event to attempt to display the HTML but nothing displayed in the WB control after the open of the window.
string ls_html
Integer li_rtn
wb_1.Resize(this.width - 100, this.height - 400)
wb_1.visible = true
ls_html = '<HTML><BODY>ARMED: N RACE: W HGT: 67 WGT: 165 EYES: BR HAIR: BR<BR/> UPDATE 2010-10-18 Miscellaneous Identifying Number: AR-A028120241</BODY></HTML>'
li_rtn = wb_1.NavigateToString(ls_html)
The only way I can make it display the HTML is upon opening the window, I have to click on a commandbutton control (Show HTML) that have the above scripts.
Since I am not knowledgeable about the new WB control, is there a way to display information in the window without user's action?
Currently, the application uses the MS web browser OLEObject to display information when the window opens. So, we want to use WB control in place of the OLEOject.
Please take a look of my attached sample application and let me know how I can use the WB control to display HTML.
Thank you very much in advance,
Toan Nguyen
Thank you for looking into my issue.
Miguel - Yes, using Navigation() to an HTML file works. I do use this method when I have a big blob of HTML data (multiple pages). However, in this situation, I know the HTML data is minimal ( < 200 characters), so I thought calling NavigationToString() is more efficient in both reducing overheads and better performance.
Kai - I will try your work-around suggestion and see if it works.
Once again, thank you both!
Regards,
Toan