CSS background-image: BLOB
e:Sep 24 2010 — edited Jan 17 2013good 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