|
|
|
Re: How to Open HTML file in same form with current items [message #348543 is a reply to message #210766] |
Wed, 17 September 2008 03:21 |
rajy_salim
Messages: 204 Registered: January 2008 Location: Beirut - Lebanon
|
Senior Member |
|
|
Aisha!
In forms 6i, you can use an OCX object to navigate to an HTML page.
The following steps may help you in doing so:
- in your form, insert an OCX element
- right-click on this object and click on "Insert Object"
- choose "Microsoft Web Browser" from the list. The object is now inserted.
- in forms menu bar, go to Programs --> Import OLE Library Interfaes.
- from the list, under OLE classes, choose Shell.Explorer.2 and under method packages, choose IWebBrowser2 then click OK. Now, a new package is added to your program units.
- in the appropriate trigger, write the following code:
declare
handlehtml ole2.obj_type;
BEGIN
synchronize;
handlehtml := ole2.create_obj('Shell.Explorer.2');
handlehtml := forms_ole.get_interface_pointer ('<block_name>.<ocx_name>');
Shell_IWebBrowser2.NAVIGATE(handlehtml,'<URL>');
END;
- run your form, and fire the trigger where you have written the code, the page specified in <URL> will be displayed in the OCX element.
Enjoy!!
Rajy
|
|
|
|
|
|
|
|
Re: How to Open HTML file in same form with current items [message #348942 is a reply to message #210766] |
Thu, 18 September 2008 06:03 |
rajy_salim
Messages: 204 Registered: January 2008 Location: Beirut - Lebanon
|
Senior Member |
|
|
Hi! You are welcome!!
Concerning the button, i have never had to click twice on a button to do its job, never faced this problem.
- Do you have any other code in the same trigger? If so, you can put debugging messages and see if they appear when you click on the button for the first time.
- Did you try to use another trigger (WHEN-NEW-FORM-INSTANCE for example) to see if the code is wortking properly or not?
Try these points.
|
|
|
|
|
|
|
|
Re: How to Open HTML file in same form with current items [message #350076 is a reply to message #210766] |
Wed, 24 September 2008 01:06 |
rajy_salim
Messages: 204 Registered: January 2008 Location: Beirut - Lebanon
|
Senior Member |
|
|
Hi!
Im glad you solved your problem that way, but I think there's something else that caused it.
I made a screen exactly like yours (or at least like what you described) and I didn't face the problem. Everytime I click the button, the page is refreshed from the first time even if I go the the OCX element. I put go_item(<ocx>) in the button so the focus is in this ocx (The cursor blinks in the search item of Google), everytime I click the button. But even though, the code is fired from the first click.
I don't know if it could be a problem of version. I am using 6.0.8.21.
Rajy
|
|
|
|
|