Solved

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

Posted on 2006-07-13
6
1,056 Views
Last Modified: 2012-06-27
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
Comment
Question by:csi-consulting
6 Comments
 
LVL 14

Expert Comment

by:sathyagiri
Comment Utility
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
 

Author Comment

by:csi-consulting
Comment Utility
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
 
LVL 2

Expert Comment

by:KJlt
Comment Utility
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
 

Author Comment

by:csi-consulting
Comment Utility
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
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
Comment Utility
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now