Oracle Fusion Middleware Blog

Deutsche Informationen rund um Oracle Fusion Middleware

Archive for Juli 2008

How to set the browser window/tab title for Oracle Forms application

leave a comment »

When running a Forms application in the browser you normally find Oracle Application Server Forms Services as the title of the browser window or if you use IE 7 or Firefox as the title of the active tab.
This title is set in the file formsweb.cfg and can be changed but it remains a piece of static text.
What if you would like to see something more meaningful like the module name, the user name or something similar ?

Here are the steps to implement it:

  1. Modify the base template (for example basejini.html) you are using by adding a JavaScript function

    function change_pagetitle(title)

  2. In every form define a trigger after startup (PRE-FORM, WHEN-NEW-FORM-INSTANCE) with the following call:
    web.show_document(‚javascript:change_pagetitle(‚||'“‚ || get_application_property(current_form_name) || ‚“‚||‘) ‚ ,’_self‘)
    In this example the name of the running form will be displayed but you can define other properties too.

With Oracle Forms 11g perhaps there is a  more simple solution based on the new JavaScript API. Let’s see.



Written by fmtechteam

22/07/2008 at 18:24

Veröffentlicht in Forms, Jürgen Menge