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!

How do I create custom popups for different fields on the same form?

53091Dec 13 2005 — edited Dec 13 2005
I have gone through the "how to create custom popups" tutorial and all works fine. I have tried to create the same scenario with a field on one of my forms. It's fairly easy to do this with one popup on the form; works fine. I need to put another popup on a different field on the same form. This is when the problem comes into play.

Have modified the code listed in step 3 to:
<script language="JavaScript" type="text/javascript">
function callMyPopup (formItem1,formItem2) {
var formVal1 = document.getElementById(formItem1).value;
var formVal2 = document.getElementById(formItem2).value;
var url;
url = 'f?p=&APP_ID.:12:&APP_SESSION.:::::P12_EQUIPMENT:' + formVal1;
url = 'f?p=&APP_ID.:10:&APP_SESSION.:::::P10_PROCEDURE:' + formVal2;
w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
if (w.opener == null)
w.opener = self;
w.focus();
}
</script>

Changed code for each field on the form as in Step 4: example
Click for LOV
Click for LOV

<script language="JavaScript">
function passBack(passVal2)
{
opener.document.getElementById("P2_PROCEDURE").value = passVal2;
close();
}
</script>

Step 5: Followed as per example, changing names and variables as needed
Step 6: Changed code for each popup form:
<script language="JavaScript">
function passBack(passVal2)
{
opener.document.getElementById("P2_PROCEDURE").value = passVal2;
close();
}
</script>

Any advice on an easy way to do this? I'm new to htmldb and must be missing something obvious. Should I call the popups separate names where it has the function callMyPopup? Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 10 2006
Added on Dec 13 2005
2 comments
617 views