Inputing CSS statements within script

Post Reply
melvint9
Posts: 19
Joined: Wed Oct 03, 2001 11:09 am

Inputing CSS statements within script

Post by melvint9 »

Good Morning,

using css, is it possible to have search results display to have alternating bground colors. for example, search# 1. (gray), search# 2. (white), search# 3. (gray).

where do I input the css statement or is it possible. Do I place the css statement within the <A Name=result> </A> opening and closing tags or do I start my own tags, such as <A Name=CSS> </A>.

Thanks for your help!

I did look at some of your other messages, but they didn't answer all the questions I have.


Melvin
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

Inputing CSS statements within script

Post by mark »

I don't think style sheets can do anything like that. It would have to be done programatically. Use a variable for your table cell background color and change it with each row.
<if $bgcolor eq "gray">
<$bgcolor=white>
<else>
<$bgcolor=gray>
</if>
melvint9
Posts: 19
Joined: Wed Oct 03, 2001 11:09 am

Inputing CSS statements within script

Post by melvint9 »

What's up Mark,

I tried the code you sent, but it's not working. I'm quite certain, it's probably at my end. please take a look at the code below and tell me what I'm missing.

Melvin

<!------------------------- Search Result Item ----------------------->

<A NAME=bgcolor>
<$bgcolor=white>
<if $bgcolor eq "gray">
<$bgcolor=white>
<else>
<$bgcolor=gray>
</if></a>

<TABLE WIDTH=70% BORDER=0 CELLPADDING=0 CELLSPACING=5 BGCOLOR=white>
<TR>
<TD VALIGN=TOP ALIGN=left bgcolor=gray width=70%><b>Title</b></TD>
<TD VALIGN=TOP Align=right bgcolor=gray width=20%>Additional Info</tr></table>

<TABLE WIDTH=70% BORDER=0 CELLPADDING=0 CELLSPACING=5 BGCOLOR=white>
<TD VALIGN=TOP>$next:</TD>
<TD VALIGN=TOP ALIGN=LEFT BGCOLOR=white>
<A HREF="$Url$xml"><mm><STRONG>$dtitle</STRONG></A>
<BR><abstract $Body 180>$ret ...</mm>
<BR><FONT SIZE=-1><strlen $Url><if $ret gt 60>
<rex ">>=http://=[^/]+/" $Url>$'ret'...
<strlen $ret><$x=($ret-57)>
<substr $Url $x -1>$ret
<else>
$Url
</if>
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

Inputing CSS statements within script

Post by mark »

Don't make a function. You're not calling it anyhow.
Should be more like
<if $bgcolor eq "gray">
<$bgcolor=white>
<else>
<$bgcolor=gray>
</if>
<table ... bgcolor="$bgcolor">

BTW, We're on the verge of consulting ($$) here.
Post Reply