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!

CSS background-image: BLOB

e:Sep 24 2010 — edited Jan 17 2013
good day people
I wanted to know how to display a blob field as a background image of a div.

How can an image (jpg) file saved as a blob be output/displayed in a Web page using PL/SQL procedure. The hpt.prn does not work.

In a region type PL / SQL (anonymous block) I have:


<pre>
declare
cursor cr_cursor is
select ID
, BACKGROUND
, FILENAME
, MIMETYPE
, LAST_UPDATE_DATE
from CFG_BACKGROUND;
v_style VARCHAR(4000);
begin
v_style := '<style>';
FOR v_cursor IN cr_cursor LOOP
v_style := v_style||'.slide_'||v_cursor.ID||'{background:url('||v_cursor.FONDO )||') no-repeat 0 0;}';
END LOOP;
v_style := v_style || '</style>';
htp.print(v_style);
end;
</pre>



the result I want is this:

*<style>*
*.slide_1 { background-image:url(image.jpg) no-repeat 0 0;}*
*.slide_2 { background-image:url(photo.jpg) no-repeat 0 0;}*
*.slide_3 { background-image:url(image_one.jpg) no-repeat 0 0;}*
*.slide_4 { background-image:url(image_dog.jpg) no-repeat 0 0;}*
*</style>*

Edited by: e:// on 24/09/2010 13:46

Edited by: e:// on 24/09/2010 13:46
This post has been answered by fac586 on Sep 26 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 14 2013
Added on Sep 24 2010
3 comments
4,303 views