Download from database

htp.init; — The mime header indicates what the type of the file is (browser will react on that) owa_util.mime_header(r_bfe.filetype, false); — use Content-Disposition: attachment to open a dialog box or inline to open in place htp.p(‘Content-disposition: attachment; filename=’||r_bfe.filename); htp.p(‘Content-length:’||dbms_lob.getlength(r_bfe.content) ); owa_util.http_header_close; — Write the BLOB to a browser session ( Read more…

Remove HTML-code

Removing/finding HTML-code using regular expressions: SELECT regexp_replace(name, ‘<.*?>’)  name_without_tags FROM table WHERE regexp_like(name, ‘<.*?>’)    

Close Child Window

Closing a child (pop) window called by using javascript. Parent javascript: popup=window.open(“https://dvrr.gs.ing.net/dvrr1/fp=110:2″,””,”location=no,toolbar=no,menubar=no,status=no, resizable=1,width=700,height=500″); window.onunload = function() { if (popup && !popup.closed) { popup.close(); } };

Background color region

To change the background color of a region assign a static ID to the region and add CSS-styles in top of the page. To color the background with a certain opacity without effect on foreground text use this code: <style> #Tmp1{ background: rgba(200, 54, 54, 0.5); } } </style> The Read more…

Background image Apex

To get a background image in Apex just add the following code to a region in a page or in css-part of a page. Putting it into a region its maybe easier to reference item with name of image and by using a process you could even randomise that. To Read more…

Refresh (plsql) Region Apex

A classic report in APex can be refreshed dynamically. A pl/sql region is more difficult, you must do this by using an application proces. Create a plsql region calling a procedure/package with htp.p-commands. IE <div id=HK3>xcvxvxvxvc</div> BEGIN show_data; END; create a application process (refresh_data) DECLARE l_param1 varchar2(100); BEGIN l_param1:= apex_application.g_x01; Read more…