Home » SQL & PL/SQL » SQL & PL/SQL » control spooled html output (oracle 9i, Windows XP)
control spooled html output [message #321410] Tue, 20 May 2008 03:32 Go to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Hey

I have the following script

set arraysize 1 

prompt <table cellspacing="1" cellpadding="2" border="0" id="myform">
prompt <tbody>
prompt <tr>
prompt <td>From Date:</td>
prompt <td><input type="text" id="fromDate" /></td>
prompt </tr>
prompt <tr>
prompt <td>To Date:</td>
prompt <td><input type="text" id="toDate" /></td>
prompt </tr>
prompt<tr>
prompt<td>Database Name</td>
prompt<td>
prompt<select name="database" id="chk">
prompt<option value="Test">Test</option>
prompt<option value="UNIX">UNIX</option>
prompt</select>
prompt</td>
prompt</tr>
prompt <tr>
prompt <td></td>
prompt <td><input type="submit" value="submit" onclick="get_data()"></td>
prompt </tr>
prompt </tbody>
prompt </table>
 
set markup html on spool on preformat off entmap off table 'border=1 cellspacing=2 align="center"'
prompt <h3 align="center">Test</h3>
connect test/test@test 
@C:\oracle\ora92\Apache\Apache\scripts\alert_log.sql
set markup html off
prompt <script type="text/javascript" src="foo.js"/></script>

prompt </HEAD>
prompt </BODY>
prompt </HTML>

spool off
exit



I want to format the header cells of the table...like give it another color

How to do so???
Re: control spooled html output [message #321415 is a reply to message #321410] Tue, 20 May 2008 04:05 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
One option would be to have an css stylesheet in another file and add a reference to that to the HEAD of the HTML file.

Like in the demo here.
Re: control spooled html output [message #321422 is a reply to message #321415] Tue, 20 May 2008 04:19 Go to previous message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Many thanks Thomas..
got the solution..
Add the following code in the header tag

prompt <style type="text/css"> 
prompt th {color:#336699; background:#cccc99}
prompt h1 {font:16pt Arial,Helvetica,Geneva,sans-serif; color:#336699;}
prompt</style>

[Updated on: Wed, 21 May 2008 00:04]

Report message to a moderator

Previous Topic: Error in Bulk insert
Next Topic: UTL_FILE: Need to reinitialize the file pointer to first position
Goto Forum:
  


Current Time: Sat Dec 10 07:07:17 CST 2016

Total time taken to generate the page: 0.05407 seconds