Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help with modal dialog returning a value to the calling page

LRMMar 13 2012 — edited Mar 21 2012
Greetings,

Apex Version: 4.1.0.0.32


What I am trying to do is to create a modal dialog that is called from a form page. The dialog will present the user with an IR report that will allow the him to select a row and return a value from that row to a field on the calling page. I have it working in Firefox, but I get an error using IE 8. I hope someone can show me why it is not working in IE.

Here is how I am doing it:

From the calling page:

Created a button
     Action: Redirect to URL
     URL Target: javascript:var rc = window.showModalDialog('f?p=&APP_ID.:70:&SESSION.::&DEBUG.:::','','resizable:yes;center:yes;dialogWidth:1000px;dialogHeight:500px;');


On the called page:

The called page is an IR report where the query returns this as one of the columns:

*(Note: I had to put a dot '.' in front of the onclick to get it to show in this thread. It is not there in my real code.)*
select
<a href="#" name="z" style="color:blue; text-decoration:underline;" .onclick="javascript:passBack(''' || LOT_NO ||''');">Select</a>' SelectThis
, column1
, column2
from sometablename;
This resolves the anchor to:
<a .onclick="javascript:passBack('232158');"  href="#">Select</a>
Here is the Javascript function that is called from the anchor onclick:
function passBack(passVal1)
{
  opener.document.getElementById("P75_ITEM1").value = passVal1;
  close();
}
When I run this in Firefox, it works as expected. I click on the button on the parent page. The modal dialog is opened and the IR report is displayed. I click on one of the links in the report and it returns the correct value back to the calling page and closes the modal dialog.

When I run it in IE8, it fails. I click on the button on the parent page. The modal dialog is opened and the IR report is displayed. I click on one of the links in the report and I get this error: “opener.document is null or not an object”.

I hope that is clear and that someone can help.

Thanks

Larry
This post has been answered by Jeff E on Mar 13 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 18 2012
Added on Mar 13 2012
7 comments
2,425 views