This content has been marked as final. Show 17 replies
Let me try to help you a little:
1. Create inside your form module, a form trigger called POST-FORM, and include the following code:
2. Create the closeBrwoser.htm, and put the following code:
win = top;
win.opener = top;
Be sure to copy the closeBrwoser.htm in one of the virtual folder defined in the OAS Server. For example, in the code I wrote in the point number one, in my OAS I a have a virtual directory called: /forms/webutil/ and in these directory I copy the file.
Look at the FORMS.CONF in your OAS installation, usually these files are in: $ORACLE_HOME/forms/server
Do your test.
Thanks for you help but i have placed the closeBrowser.htm in the virtual directory /forms/webutil/..... that i can see in my forms.conf
However when i exit the application, i get this error message
The requested URL /forms/webutil/closeBrowser.htm was not found on this server.
What am i doing wrong
You can do also a simple test usign forms builder 10g.
Open the builder and develop a simple module with just, one button on canves.
Write the following code on the WHEN-BUTTON-PRESSED Trigger:
Run the module in your OAS and see if that works.
The module after pressing the button must close all your execution.
The same way if you write the url I gave before, the internet explorer windows must close.
Has anyone salved this problem?
Cause I have the same one.
But I dont have folders forms/webutil, but forms90/xx
But these virtual folders - we can not see them right? SO how to define to which folder has to go that htm file, if I dont even see the folders?
This is my whole file FORMS90.CONF:
# $Id: forms90.conf,v 1.4 2003/05/28 18:45:07 ahousing Exp $
# Apache mod_oc4j and mod_jserv configuration file for Forms 9i Services.
# This file should be included into the Oracle Apache HTTP Listener
# configuration file (typically by adding an include statement to the
# oracle_apache.conf file)
# If Forms is to be used with JServ, the jserv.properties file needs editing
# to add the "forms90" servlet zone with properties file forms90.properties
# Virtual paths: We use AliasMatch when defining virtual paths for
# security reasons (prevents directory browsing).
# Virtual path mapping for Forms Java jar and class files (codebase)
AliasMatch ^/forms90/java/(..*) "C:\OracleSuite10g/forms90/java/$1"
# Virtual path for JInitiator downloadable executable and download page
AliasMatch ^/forms90/jinitiator/(..*) "C:\OracleSuite10g/jinit/$1"
# Virtual path for runform.htm (used to run a form for testing purposes)
AliasMatch ^/forms90/html/(..*) "C:\OracleSuite10g/tools/web90/html/$1"
# Configuration for JServ (if mod_jserv.c is available and not mod_oc4j.c)
# Only configure for JServ if mod_oc4j is NOT available:
# Virtual path mapping for FormsServlet and ListenerServlet.
# Purpose: paths to invoke the servlets should be /forms90/f90servlet
# and /forms90/l90servlet respectively.
# We map f90servlet to servlet.if90, and l90servlet to servlet.ifl90.
# The apJServAction directives (below) will then remap those.
AliasMatch ^/forms90/f90servlet(.*) "/servlet.if90"
AliasMatch ^/forms90/l90servlet(.*) "/servlet.ifl90"
ApJServMount /forms90/servlet /forms90
# Let the servlets be called by file extension (e.g /servlet.if90)
ApJServAction .if90 /forms90/servlet/f90servlet
ApJServAction .ifl90 /forms90/servlet/l90servlet
# Prevent access to the Forms Servlets by paths other than
# /forms90/f90servlet and /forms90/l90servlet.
# 1. Prevent access via the .if90 and .ifl90 file extensions:
deny from all
# 2. Stop access by class (by paths like
deny from all
# Config. for OC4J
Oc4jMount /forms90 OC4J_BI_Forms
Oc4jMount /forms90/f90servlet OC4J_BI_Forms
Oc4jMount /forms90/f90servlet/* OC4J_BI_Forms
Oc4jMount /forms90/l90servlet OC4J_BI_Forms
Oc4jMount /forms90/l90servlet/* OC4J_BI_Forms
So how can I know which folder to use from these text?
And btw, do I need to manually create that virtual folder? Is it in my case folder "servlet"?
Edited by: Mitja Bonca on 29.5.2009 15:14
It seems it works sometihng.
I created a folder "forms90/f90servlet" and inside put that hml file
This is now what it shows when I click X for closing the main Form - PICTURE
And if I click OK, this picture closes, but the browser does not! Any ideas?
Edited by: Mitja Bonca on 29.5.2009 15:26
As I told before, it is not important where you place the closeBrowser.htm as much as the OC4J (or your iAS) see the virtual path pointing to these path.
I already developed a module and create a trigger named POST-FORM (Level form) and in its code I wrote a simple line just to test the closeBrowser.htm:
As you see, in my configuration file, forms.conf, i have defined a line like this:
# Virtual path for webutil
AliasMatch ^/forms/webutil/(..*) "C:\Oracle\DevSuite10g/forms/webutil/$1"
So this lines tells to OC4J that any file you put in it, you see it by url using the following syntax:
In your case, try using
http://host:port/forms90/f90servletl/closeBrowser.htm (take car of the syntax of the names, is htm not nml).
If those works, you can replace these instruction inside your modle, as I mentioned above specifying in the web.show_document the viertual path and the htm file.
Hope it works
AEMS GLobal Group
Mitja, in your forms90.conf, there is html directory predefined during installtion
You can put your close.html in C:/OracleSuite10g/tools/web90/html folder and call in
# Virtual path for runform.htm (used to run a form for testing purposes) AliasMatch ^/forms90/html/(..*) "C:\OracleSuite10g/tools/web90/html/$1"
Edited by: Slava Natapov on May 29, 2009 9:51 AM
It`s not working! I did like you said, but I got an error page!
btw, what code it should be to close just the tab, not the whole running browser? Just one tab (window, on which oracle is running).
If this is the code for closing whole browser:
win = top;
win.opener = top;
what could be then for just a tab?