[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1139
  • Last Modified:

Oracle Forms (9i) - Best way to display HTML code in the database (VARCHAR2 field) from Oracle Forms

Following: I am sending automatically HTML Emails from an Oracle 9i database.
After each email is sent, the subject, email body (...) get saved within the database.

Now, using and in oracle forms, an administrator can access / display the emails bodies - but this is pure HTML code; since full of HTML tags, it is not that easily readable.

I would like to add a push button close to this text field, so that as soon as pressed, an additional browser window (Internet Explorer) pops up displays the HTML message (formated this time).
You may nevertheless recommend another application to display this HTML code (formated), you are very much welcome.
Thanks to let me know how... do you I have to go for webUtil ? Or older OLE package is sufficient ?

0
csi-consulting
Asked:
csi-consulting
1 Solution
 
sathyagiriCommented:
You should be able to do this with OLE container object.
See this link
http://www.oracle.com/technology/products/forms/htdocs/webutil/howto_ole.html
0
 
csi-consultingAuthor Commented:
Thanks. In fact I saw this one already. But it is dealing with word which does not seem the write application to display some HTML formated code. I need something more generic. I come back to Internet Explorer;

I just saw this evening in the oracle forum (http://forums.oracle.com/forums/message.jspa?messageID=484539)
the following which seems to be a very good start.

-- Code ----------------------
declare
webhandle ole2.obj_type;
args OLE2.LIST_TYPE;
begin

webhandle := OLE2.CREATE_OBJ('InternetExplorer.APPLICATION');
--Open
OLE2.set_property(webhandle,'Visible','True');
args := OLE2.create_arglist;
OLE2.add_arg(args,'c:\test.htm');
OLE2.invoke(webhandle,'Navigate',args);
OLE2.destroy_arglist(args);
(...)
OLE2.release_obj(webhandle);
end;
-----------------------------------------

Question from my side:
1. I guess the file which is getting opened is on the client side ? I am not sure this is the right thing to do since I am depending on the existence of a specific path where I would save a temporary file.
2. is it really not possible to avoid creating a file upfront ? I would like to pass the content of the database field directly to the internet explorer browser / do you think feasible ? How ?
3. Once again, any recommendation regarding a generic HTML editor is welcome. The standard Oracle Forms are fine but of course not to display formated HTML code.

Thanks again for your support!
0
 
KJltCommented:
I think OLE is a wrong way for solving your problem. AFAIK in Forms 9i OLE was deprecated... Please someone correct me if I am wrong...

I think you will need some Java Bean in your Forms for transfering html content to client side. There is a standart procedure in Forms for opening browser window whith desirable url (don't as whitch i don't remember).

Unfortunately i am not working with Forms now. I have no installation, no documentation and no will to come back to Forms :) I tried to help you as i could...

0
 
csi-consultingAuthor Commented:
Thank you very much. You are referring to web.show_document I guess.
And I was stuck there when I saw 'SHOW_DOCUMENT (url, target);'
One question would be if in the worst case I can reference a file in the url instead of http:// ... but the problematic with the files I would like to avoid would remain / I preferred not to investigate further.

Preferably, would go for your solution with the Java Bean but must admit that I did not learn Java myself. More information / documentation on how to pass the html code to the client side would be great - a small example would be the best. Thanks again in any case.
0
 
Computer101Commented:
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now