Overblog Suivre ce blog
Editer l'article Administration Créer mon blog


Free tool

Look and Feel Project

10 mai 2007 4 10 /05 /mai /2007 07:15

For a checking out purpose, I would be able to display the HTML content of a Text Item in the default Internet Browser window.
My first thought was to create a HTML file on the local machine then call it with the Webutil functions:

  • client_text_io() functions to create the local file
  • client_host() function to launch the file into the Internet Browser

That does the job, but requires that Webutil is configured.
So I thought about eliminating all the Webutil stuff by concentrating all the logical within a single Web.Show_Document() call:

   LC$Output Varchar2(32000);
   LC$Texte  Varchar2(32000) := Name_In(:system.trigger_item) ;
   -- HTML output that needs no file generation ! --
   LC$Output := 'javascript:document.write("' ;
   LC$Output := LC$Output || '<html><body><FONT face=sans-serif size=3>' ;
   LC$Output := LC$Output || replace( LC$Texte, CHR(10), '<br>') ;
   LC$Output := LC$Output || '</body></html>");' ;

Partager cet article

Repost 0
Francois Degrelle - dans Oracle Forms
commenter cet article


rochelle 24/08/2009 11:10

Hi Francois,

You posted:

Works fine with IE 6.0.2800 SP1 and also with Firefox 2.0

How come? i'm also using IE6 but service pack2 but not working only in FF. you mean it's only working with service pack1 IE?

mark 22/06/2007 18:11

Doesnt work in IE..  I tried it and found this Oracle forum posthttp://forums.oracle.com/forums/thread.jspa?messageID=1161101?The problem is actually caused as a result of recent Microsoft Security changes which prevents Forms from passing URLs to the browser which contain the prefix "javascript". In short, you can not longer use the "javascript" protocol in Forms with WEB_SHOW.DOCUMENT. This is not a bug, but rather a change in security.

Francois Degrelle 25/06/2007 14:28

Works fine with IE 6.0.2800 SP1 and also with Firefox 2.0Francois

Patrick Wolf 10/05/2007 09:16

Nice tip!