Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » CSS Header doctype
CSS Header doctype [message #490875] Thu, 27 January 2011 19:52 Go to next message
Messages: 1
Registered: January 2011
Junior Member

I hope this is the right forum. I am using the web development toolkit.

I am trying to generate a css file on the fly from a stored procedure. In my html I would have

<link rel="stylesheet" type="text/css" href="myserver/mypackage.renderCSSPage">

In the procedure renderCSSPage I would basically print a lot of css rows. However, I am a bit stuck with generating a css header. Especially so that the file could be cached in the end.

I want to achieve something like this

<meta http-equiv="Content-Style-Type" content="text/css">
or better an http header with Content-Style-Type: text/css.

I tried this:

owa_util.mime_header('text/css', false);

However it prints Content-type: text/css; charset=ISO-8859-1 in my code rather than changing the header type.

Thank you for help in advance

Re: CSS Header doctype [message #490877 is a reply to message #490875] Thu, 27 January 2011 21:57 Go to previous messageGo to next message
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: CSS Header doctype [message #492511 is a reply to message #490877] Mon, 31 January 2011 18:19 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Personally, I'd get rid of all the wrapper functions, and just print what you want using htp.p (or whatever. see spec of htp and htf for more procs/functs).

Write HTTP headers like this:
 OWA_UTIL.mime_header ('text/plain', FALSE);
 HTP.p ('Cache-Control: no-cache');
 HTP.p ('Pragma: no-cache');

Write HTML like this:
<title>Blah Blah</title>
<link rel="stylesheet" type="text/css" href="myserver/mypackage.renderCSSPage">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<body >...

If you know what you want your html to look like, htp.p makes life easier that learning all the wrapper functions (you need to resort to htp.p anyway when the wrapper doesn't give you exactly what you want).
Previous Topic: Ajax Based parameterized report and pagination
Next Topic: PL/SQL to grant privileges to roles
Goto Forum:

Current Time: Thu Mar 23 23:03:28 CDT 2023