Running@Oracle

Experience around running and Oracle software development

  •  

    July 2008
    M T W T F S S
    « Mar    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  

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

Posted by xtrailrunner on July 22, 2008

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
    <script>
    function change_pagetitle(title)
    {
    document.title=title;
    }
    </script>
  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.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>