iSelfSchooling.com  Since 1999     References  |  Search more  | Oracle Syntax  | Free Online Oracle Training

    Home      .Services     Login       Start Learning     Certification      .                 .Share your BELIEF(s)...

 

. Online Accounting        .Copyright & User Agreement   |
    .Vision      .Biography     .Acknowledgement

.Contact Us      .Comments/Suggestions       Email2aFriend    |

 

Online Oracle Training for beginners and advanced - The most comprehensive Oracle tutorial

The authors do not guarantee or take any responsibility for the accuracy, or completeness of the information.

 

 

 

 

 

 

 

 

 

 

Lesson 01

"Love is doing small things with great love."

-Mother Teresa (1910-1997)

Q: How can I call an html from an Oracle Form. 

A: Let us first find out what the built-in WEB.SHOW_DOCUMENT is and how you can use it within a Web Form. 

WEB.SHOW_DOCUMENT is a built-in that is used in Forms to call another URL 
from a Web Form. It works much the same way that a link on an HTML page 
works. It takes two arguments, URL and TARGET. 

The following is The WEB.SHOW_DOCUMENT built-in format:
WEB.SHOW_DOCUMENT('http://www.oracle.com', '_blank');

Both arguments must be enclosed in single quotation marks ('). The built-in 
passes the URL (the first argument) to the browser's URL line. Then, it 
opens the page according to how the TARGET (the second argument) is set.

Here is the equivalent HTML code to WEB.SHOW_DOCUMENT:

<A HREF="http://www.oracle.com" target="new" Call to my HTML</A><BR>

Notice that the structure of the HTML code is almost identical to the
structure of the WEB.SHOW_DOCUMENT. The only difference is the added
line 'call to my HTML' which is what actually shows up on the HTML page as a 
way to trigger the HTML code. In forms, this is not needed because 
WEB.SHOW_DOCUMENT is placed inside a form trigger.

A target is a way of telling the browser how you would like the new page to be
opened up. A target does not need to be specified in either WEB.SHOW_DOCUMENT
or the HTML code. If a target is not specified, it defaults to the target
"_self". 

The target "_self" replaces the current browser with the URL that is
specified in the first argument of the built-in. If the HTML page is split
into multiple frames, it only replaces the current frame from which it is
called. For example, if the form is in the left hand frame of an HTML page
and a WEB.SHOW_DOCUMENT is called, the form itself is replaced with the new
URL. The right hand frame remains unchanged.

The target "_blank" opens a new browser over the top of the form with
the URL specified in the first argument. The original browser is still 
running with the form behind the new browser. Focus can be moved back and
forth between the two browsers with the mouse. 

The "_top" target places the new URL in the current browser, but displays
on top of any frames that have been set up. For example, if an HTML
page is split into two frames with the form running on the left hand frame,
and if the form issues a WEB.SHOW_DOCUMENT call using the "_top" target, 
the new URL takes up the whole HTML page, not just the left hand frame.

Finally, the "_parent" target replaces the parent window or frameset with
the URL. It displays on top of any frames that have been set up, much
like the "_top" does. If the reference is in a window or top-level frame, 
it is equivalent to the target "_self".

WEB.SHOW_DOCUMENT is used as a link to a web based report. There is no
other functionality or interaction between the form and the report other 
than the passing of a specific URL to the browser. As a rule of thumb, 
test the report out standalone inside the browser. If it runs fine by
itself, it should run from forms using WEB.SHOW_DOCUMENT. Anything that 
can be passed on a URL line, such as parameters, can be passed through 
WEB.SHOW_DOCUMENT in the URL argument. Remember that all forms is doing 
is creating a link to a new URL and, in this case, the URL is the report 
being called. 

You can test this from a simple HTML page using the equivalent HREF tag 
to call your report. Use the example in the first section of this article
to try this; it works much the same way.