Wednesday, February 24, 2010

Adding button side to text field for oracle apex

This is with related to a trick in Oracle apex3.1.
If you want to add a button near by(Exactly at the right hand side of a text field) a text field in a form that will open a pop up window.
First create a display only text item.
In the post element text attribute of the display only text item add the following text

<button onmouseover="'hand'" style="cellpadding: 16;" type="button">

In the HTML header of your apex page add these java script function

var url;
if (pKeyValue > 0) {url = 'f?p='+pAPP_ID+':'+pPageNo+':'+pAPP_SESSION+'::::'+pKeyColumn+','+pIRReportID+','+pModeColumn+':'+pKeyValue+','+$v('apexir_REPORT_ID')+','+pMode;}
else {url = 'f?p='+pAPP_ID+':'+pPageNo+':'+pAPP_SESSION+'::::'+pModeColumn+':'+pMode;}
var w = open(url,"winLov","Scrollbars=1,resizable=1,width="+pWidth+",height="+pHeight+", noresize modal=yes");
if (w.opener == null)
w.opener = self;

In the edit region page make both the text field and the newly created display only text as a single item.

No comments:
Write comments