Gossamer Forum
Home : Products : DBMan : Customization :

Changing Colors of Tables.... not working!

Quote Reply
Changing Colors of Tables.... not working!
Ok, I edited the html.pl script... I got the background color to work and some of the coloring in the tables on various areas of the script within the database.. BUT.. if I click "View" and it returns the items to me they are in a table with no border and no color.... I need to edit that because they all "run-together" and it is hard to see which entry is which.... (they are too close together)..
I have searched UP and DOWN to find where to edit it in the HTML.pl file.. with no such luck.... someone.. please tell me how you did it.
For example... the actual demo on this site has a yellow bg table color when returning items.... how would I do that...? (and a border)


Oh..... and if anyone knows what the problem is.. but when I click to view an item to modify it and say I enter item# 1... and it returns that item... well the drop down menu defaults to the beginning.... but on the Gossamer demo it defaults to whatever entry was selected when you added the item to the database.... can anyone help me please?

Thanks in advance!
Michele

------------------
If you respond to this, please E-mail me as well at mwatson@cybershare.com
Quote Reply
Re: Changing Colors of Tables.... not working! In reply to
You set the background color of a table with the html code

<table bgcolor=#[hex code for desired color]

If you want tables, add

border=1

to the table tag. Or border=2 or 3.... the larger the number, the wider the border will be.

You also might want to play around with things like cellspacing and cellpadding to get the text in a format you like.

To get a pattern for table tags, look in html.pl, for example:

Code:
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3
width=500 align=center valign=top>



------------------
JPD
Quote Reply
Re: Changing Colors of Tables.... not working! In reply to
Make sure you're modifying the proper sub for the html that's being returned. With later versions of Navigator and IE you can use color and background images in tables the same way you insert them into the body tag. The attribute can be applied to <table>, <tr>, or <td> and will apply to anything defined by that tag- eg, to color a row:
<tr bgcolor=#somecolorcode>.
Quote Reply
Re: Changing Colors of Tables.... not working! In reply to
Anyone come up with a way to rotate colors between records in table results? (Exactly how this forum rotates color between Responses within Topics.)

Let me know how you did it.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Changing Colors of Tables.... not working! In reply to
You might want to check to be sure that $db_auto_generate is set to 0 in the .cfg file. If it's set to 1, you won't see any of the changes you've made to the html.pl file.

Regarding the select lists on the modify form -- make sure that you are using

print &build_select_field("FieldName",$rec{'FieldName'});

to build your select field and that you have defined your select field options in the .cfg file.

To Eliot--

Here's what I did. I have all my hits in one table, with each hit in a separate row. (I'm using the short/long mod, but this should work without it, too.

I use the following code in html_view_success:

Code:
$i = 1;
print "<table>";
for (0 .. $numhits - 1) {
if ($i%2) {
print qq|<tr bgcolor="#999999">|;
}
else {
print qq|<tr bgcolor="#ffffff">|;
}
&html_record (&array_to_hash($_, @hits));

print "</tr>";
++$i;
}
print "</table>";



------------------
JPD





Quote Reply
Re: Changing Colors of Tables.... not working! In reply to
Great! It works wonderfully, Carol!

Thanks for your assistance.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us