This discussion is archived
1 Reply Latest reply: Mar 22, 2013 12:23 AM by Christian Erlinger RSS

Javascript and Oracle 10g Forms

995469 Newbie
Currently Being Moderated
I am updating this because after spending some time debugging this problem, I now understand bettter where the problem really is.

I have a problem with the code below with the window.blur() function not working in one function.

My basejpi.htm file has 2 javascript functions.

1) function hide_me works fine and triggered onload="hide_me". (all good here)

function hide_me() {
window.resizeTo(0,0);
window.moveTo(1000,1000);
window.blur();
// This function works correctly when basejpi onload calls it, the IE browser window is moved AND blurred!
}

2) Function form_maximize is called from the when_new_form_instance. The first line of it successfully maximizes the Oracle form. The next lines successfully resize and move the IE browser window, but the blur() function does NOT work. (I only added the resize and move just to prove to myself that something was working. I only need the blur() to work here.)

function form_maximize(){
document.OracleApplet.getFrame().setExtendedState(6);
window.opener=self;
window.resizeTo(300,300);
window.moveTo(500,500);
window.blur();
// Everything works here EXCEPT the blur function.
}

When the IE browser starts, it successfully calls hide_me and moves/blurs itself. Then when my form when_new_form_instance calls the form_maximize function to maximize the FORM window, the IE browser window "pops" to the forfront every time. I would prefer if the IE browser window would just remain blurred at all times, but am trying to re-blur it in each function execution. . .

when_new_form_instance call:
web.show_document('javascript:form_maximize();','_self');

So my question/problem is, why does the blur() function NOT blur the IE parent window, but the resize and maximize/move lines DO successfully modify the IE parent window? How can I blur the IE parent window from this when_new_form_instance forms event call of the javascript function form_maximize() in basejpi.htm?





Original post below
=================================================================
Using Oracle forms 10g on a client pc running windows xp/windows 7 (happens on both)
(new forms user)

Description
Our application starts with an internet explorer maximized page that has several links to different parts of our application.

When you click on the main link to our application, (after a small login box), it brings up the main form, FORM1 maximized. This form has several buttons that can be clicked to bring up different sections. If the user clicks on a button on FORM1, it then uses call_form to bring up FORM2 full size and minimizes FORM1.

This works correctly as far as I have described, but intermittenly, for unknown reasons, AFTER it flashed up FORM2, it will then maximize the IE window over the top of FORM2.

Any idea is appreciated.

David

Edited by: 992466 on Mar 21, 2013 11:06 AM

Edited by: 992466 on Mar 21, 2013 11:49 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points