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,085 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Expert Comment

by:sathyagiri
ID: 17101098
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
ID: 17103444
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
ID: 17106069
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
ID: 17106374
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
ID: 19995477
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

749 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