PC Review


Reply
Thread Tools Rate Thread

Change BGround Row Color depending on a Value in a Database field

 
 
=?Utf-8?B?U3R1YXJ0?=
Guest
Posts: n/a
 
      17th Apr 2005
I have a Database of Staff and in the database is a field Called fldtype.
I have a table that show all the staff but it all start to blend in to a
mess just looking at same colours for everyone.

I have got the code to give alt row a different color and that helps but
what I really want is some code that will change the Bcolor and or Text color
depending on the field value contained in "fldType"

IE: If fldtype="Teacher" then Color red or if fldtpye="technician" then
color Green else if fldtype="Admin" then color orange.

Do you get what I mean.

I am new to this as I am a Netowrk man not a Web Coder but my School asked
if I could help out as site needs a major over haul.

Web editor being used is FP2000 and FP2003 at home.

Thanks
Sturt
 
Reply With Quote
 
 
 
 
Thomas A. Rowe
Guest
Posts: n/a
 
      17th Apr 2005
Can you paste the code that show how you are displaying the records?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Stuart" <(E-Mail Removed)> wrote in message
newsADA513C-F204-455C-93FF-(E-Mail Removed)...
>I have a Database of Staff and in the database is a field Called fldtype.
> I have a table that show all the staff but it all start to blend in to a
> mess just looking at same colours for everyone.
>
> I have got the code to give alt row a different color and that helps but
> what I really want is some code that will change the Bcolor and or Text color
> depending on the field value contained in "fldType"
>
> IE: If fldtype="Teacher" then Color red or if fldtpye="technician" then
> color Green else if fldtype="Admin" then color orange.
>
> Do you get what I mean.
>
> I am new to this as I am a Netowrk man not a Web Coder but my School asked
> if I could help out as site needs a major over haul.
>
> Web editor being used is FP2000 and FP2003 at home.
>
> Thanks
> Sturt



 
Reply With Quote
 
=?Utf-8?B?U3R1YXJ0?=
Guest
Posts: n/a
 
      17th Apr 2005
Here is code with the alt row color
<html>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not
Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>tblStaffList -- View</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>
<%
strOddColor = "bgcolor='#FFFFFF'"
strEvenColor = "bgcolor='#C0C0C0'"
intLineNum = 0
%>
<table width="100%" border="1">
<thead>
<tr>
<th ALIGN="LEFT"><b>Initials</b></th>
<th ALIGN="LEFT"><b>Surname</b></th>
<th ALIGN="LEFT"><b>Firstname</b></th>
<th ALIGN="LEFT"><b>Staff Type</b></th>
<th ALIGN="LEFT"><b>Department</b></th>
<th ALIGN="LEFT"><b>Room</b></th>
<th ALIGN="LEFT"><b>Other Info</b></th>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
s-columntypes="3,202,202,202,202,202,202,202" s-dataconnection="Stafflist"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Intials"
s-menuvalue="Intials" b-tableborder="TRUE" b-tableexpand="TRUE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="FALSE" s-recordsource="tblStaffList"
s-displaycolumns="Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
s-criteria s-order s-sql="SELECT * FROM tblStaffList" b-procedure="FALSE"
clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records
returned." i-maxrecords="256" i-groupsize="0" botid="0"
u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc"
u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64
bgcolor="#FFFF00" width="100%"><font color="#000000">This is the start of a
Database Results region.</font></td></tr>" b-UseDotNET="FALSE" CurrentExt
sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes
b-WasTableFormat="TRUE" startspan --><!--#include
file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database
Results component on this page is unable to display database content. The
page must have a filename ending in '.asp', and the web must be hosted on a
server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblStaffList"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=7 align=""LEFT"" width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Stafflist"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="Intials"
fp_sMenuValue="Intials
fp_sColTypes="&ID=3&Intials=202&Surname=202&Firstname=202&fldType=202&Department=202&Room=202&OtherInfo=202&"
fp_iDisplayCols=7
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="52067" -->
<%
intLineNum = intLineNum + 1
If intLineNum Mod 2 = 0 Then
strLineColor = strEvenColor
Else
strLineColor = strOddColor
End If
%>
<tr <%=strLineColor%>>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
s-column="Intials" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="&lt;font
size="-1">&lt;&lt;</font>Intials<font size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Intials")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="13821" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
s-column="Surname" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Surname<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Surname")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="15149" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
s-column="Firstname" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Firstname<font size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Firstname")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="18968" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
s-column="fldType" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>fldType<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"fldType")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="15267" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
s-column="Department" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Department<font size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Department")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="29735" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
s-column="Room" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Room<font
size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"Room")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="5966" --></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
s-column="OtherInfo" b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>OtherInfo<font size="-1">&gt;&gt;</font>" startspan
--><%=FP_FieldVal(fp_rs,"OtherInfo")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="21234" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00"
width="100%"><font color="#000000">This is the end of a Database Results
region.</font></td></tr>" startspan --><!--#include
file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
</table>

<table width="100%" align=left id="table1">
<tr>
<td width="22%" align=right>
<table id="table2">
<tr>
<td>
Results Page
| <a href="editor/submission_form.asp" target="_top">Submission Form</a>
| <a href="editor/database_editor.asp" target="_top">Database Editor</a>
</td>
</tr>
</table>
</td>
</tr>
</table>


</body>

</html>


"Thomas A. Rowe" wrote:

> Can you paste the code that show how you are displaying the records?
>
> --
> ==============================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> ==============================================
> To assist you in getting the best answers for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>
> "Stuart" <(E-Mail Removed)> wrote in message
> newsADA513C-F204-455C-93FF-(E-Mail Removed)...
> >I have a Database of Staff and in the database is a field Called fldtype.
> > I have a table that show all the staff but it all start to blend in to a
> > mess just looking at same colours for everyone.
> >
> > I have got the code to give alt row a different color and that helps but
> > what I really want is some code that will change the Bcolor and or Text color
> > depending on the field value contained in "fldType"
> >
> > IE: If fldtype="Teacher" then Color red or if fldtpye="technician" then
> > color Green else if fldtype="Admin" then color orange.
> >
> > Do you get what I mean.
> >
> > I am new to this as I am a Netowrk man not a Web Coder but my School asked
> > if I could help out as site needs a major over haul.
> >
> > Web editor being used is FP2000 and FP2003 at home.
> >
> > Thanks
> > Sturt

>
>
>

 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      17th Apr 2005
I don't use the FP database components, but doing the following should work.

Replace the following:

<%
intLineNum = intLineNum + 1
If intLineNum Mod 2 = 0 Then
strLineColor = strEvenColor
Else
strLineColor = strOddColor
End If
%>

With:

<%
If FP_FieldVal(fp_rs,"fldType") = "Teacher" Then
strLineColor = "#FF0000" ' red
ElseIf FP_FieldVal(fp_rs,"fldType") = "Technician" Then
strLineColor = "#006600" ' green
ElseIf FP_FieldVal(fp_rs,"fldType") = "Admin" Then
strLineColor = "#FF9900" ' orange
Else
strLineColor = "#FFFFFF" ' white
End If
%>

Note the CaSe of Teacher, Technician, etc. in the database must exactly match the text in the equal
statement above.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Stuart" <(E-Mail Removed)> wrote in message
news:F4D3557A-3B1C-4DA2-ABA0-(E-Mail Removed)...
> Here is code with the alt row color
> <html>
>
> <head>
> <% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not
> Edit.
> FP_CharSet = "windows-1252"
> FP_CodePage = 1252 %>
> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> <title>tblStaffList -- View</title>
> <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
> <meta name="ProgId" content="FrontPage.Editor.Document">
> </head>
>
> <body>
> <%
> strOddColor = "bgcolor='#FFFFFF'"
> strEvenColor = "bgcolor='#C0C0C0'"
> intLineNum = 0
> %>
> <table width="100%" border="1">
> <thead>
> <tr>
> <th ALIGN="LEFT"><b>Initials</b></th>
> <th ALIGN="LEFT"><b>Surname</b></th>
> <th ALIGN="LEFT"><b>Firstname</b></th>
> <th ALIGN="LEFT"><b>Staff Type</b></th>
> <th ALIGN="LEFT"><b>Department</b></th>
> <th ALIGN="LEFT"><b>Room</b></th>
> <th ALIGN="LEFT"><b>Other Info</b></th>
> </tr>
> </thead>
> <tbody>
> <!--webbot bot="DatabaseRegionStart"
> s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> s-columntypes="3,202,202,202,202,202,202,202" s-dataconnection="Stafflist"
> b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Intials"
> s-menuvalue="Intials" b-tableborder="TRUE" b-tableexpand="TRUE"
> b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
> i-listformat="0" b-makeform="FALSE" s-recordsource="tblStaffList"
> s-displaycolumns="Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> s-criteria s-order s-sql="SELECT * FROM tblStaffList" b-procedure="FALSE"
> clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records
> returned." i-maxrecords="256" i-groupsize="0" botid="0"
> u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc"
> u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64
> bgcolor="#FFFF00" width="100%"><font color="#000000">This is the start of a
> Database Results region.</font></td></tr>" b-UseDotNET="FALSE" CurrentExt
> sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes
> b-WasTableFormat="TRUE" startspan --><!--#include
> file="../_fpclass/fpdblib.inc"-->
> <% if 0 then %>
> <SCRIPT Language="JavaScript">
> document.write("<div style='background: yellow; color: black;'>The Database
> Results component on this page is unable to display database content. The
> page must have a filename ending in '.asp', and the web must be hosted on a
> server that supports Active Server Pages.</div>");
> </SCRIPT>
> <% end if %>
> <%
> fp_sQry="SELECT * FROM tblStaffList"
> fp_sDefault=""
> fp_sNoRecords="<tr><td colspan=7 align=""LEFT"" width=""100%"">No records
> returned.</td></tr>"
> fp_sDataConn="Stafflist"
> fp_iMaxRecords=256
> fp_iCommandType=1
> fp_iPageSize=0
> fp_fTableFormat=True
> fp_fMenuFormat=False
> fp_sMenuChoice="Intials"
> fp_sMenuValue="Intials"
> fp_sColTypes="&ID=3&Intials=202&Surname=202&Firstname=202&fldType=202&Department=202&Room=202&OtherInfo=202&"
> fp_iDisplayCols=7
> fp_fCustomQuery=False
> BOTID=0
> fp_iRegion=BOTID
> %>
> <!--#include file="../_fpclass/fpdbrgn1.inc"-->
> <!--webbot bot="DatabaseRegionStart" endspan i-checksum="52067" -->
> <%
> intLineNum = intLineNum + 1
> If intLineNum Mod 2 = 0 Then
> strLineColor = strEvenColor
> Else
> strLineColor = strOddColor
> End If
> %>
> <tr <%=strLineColor%>>
> <td>
> <!--webbot bot="DatabaseResultColumn"
> s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> s-column="Intials" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
> clientside b-MenuFormat preview="&lt;font
> size="-1">&lt;&lt;</font>Intials<font size="-1">&gt;&gt;</font>" startspan
> --><%=FP_FieldVal(fp_rs,"Intials")%><!--webbot bot="DatabaseResultColumn"
> endspan i-checksum="13821" --></td>
> <td>
> <!--webbot bot="DatabaseResultColumn"
> s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> s-column="Surname" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
> clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Surname<font
> size="-1">&gt;&gt;</font>" startspan
> --><%=FP_FieldVal(fp_rs,"Surname")%><!--webbot bot="DatabaseResultColumn"
> endspan i-checksum="15149" --></td>
> <td>
> <!--webbot bot="DatabaseResultColumn"
> s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> s-column="Firstname" b-tableformat="TRUE" b-hashtml="FALSE"
> b-makelink="FALSE" clientside b-MenuFormat preview="<font
> size="-1">&lt;&lt;</font>Firstname<font size="-1">&gt;&gt;</font>" startspan
> --><%=FP_FieldVal(fp_rs,"Firstname")%><!--webbot bot="DatabaseResultColumn"
> endspan i-checksum="18968" --></td>
> <td>
> <!--webbot bot="DatabaseResultColumn"
> s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> s-column="fldType" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
> clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>fldType<font
> size="-1">&gt;&gt;</font>" startspan
> --><%=FP_FieldVal(fp_rs,"fldType")%><!--webbot bot="DatabaseResultColumn"
> endspan i-checksum="15267" --></td>
> <td>
> <!--webbot bot="DatabaseResultColumn"
> s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> s-column="Department" b-tableformat="TRUE" b-hashtml="FALSE"
> b-makelink="FALSE" clientside b-MenuFormat preview="<font
> size="-1">&lt;&lt;</font>Department<font size="-1">&gt;&gt;</font>" startspan
> --><%=FP_FieldVal(fp_rs,"Department")%><!--webbot bot="DatabaseResultColumn"
> endspan i-checksum="29735" --></td>
> <td>
> <!--webbot bot="DatabaseResultColumn"
> s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> s-column="Room" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
> clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>Room<font
> size="-1">&gt;&gt;</font>" startspan
> --><%=FP_FieldVal(fp_rs,"Room")%><!--webbot bot="DatabaseResultColumn"
> endspan i-checksum="5966" --></td>
> <td>
> <!--webbot bot="DatabaseResultColumn"
> s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> s-column="OtherInfo" b-tableformat="TRUE" b-hashtml="FALSE"
> b-makelink="FALSE" clientside b-MenuFormat preview="<font
> size="-1">&lt;&lt;</font>OtherInfo<font size="-1">&gt;&gt;</font>" startspan
> --><%=FP_FieldVal(fp_rs,"OtherInfo")%><!--webbot bot="DatabaseResultColumn"
> endspan i-checksum="21234" --></td>
> </tr>
> <!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE"
> b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0"
> clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00"
> width="100%"><font color="#000000">This is the end of a Database Results
> region.</font></td></tr>" startspan --><!--#include
> file="../_fpclass/fpdbrgn2.inc"-->
> <!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
> </table>
>
> <table width="100%" align=left id="table1">
> <tr>
> <td width="22%" align=right>
> <table id="table2">
> <tr>
> <td>
> Results Page
> | <a href="editor/submission_form.asp" target="_top">Submission Form</a>
> | <a href="editor/database_editor.asp" target="_top">Database Editor</a>
> </td>
> </tr>
> </table>
> </td>
> </tr>
> </table>
>
>
> </body>
>
> </html>
>
>
> "Thomas A. Rowe" wrote:
>
>> Can you paste the code that show how you are displaying the records?
>>
>> --
>> ==============================================
>> Thomas A. Rowe (Microsoft MVP - FrontPage)
>> WEBMASTER Resources(tm)
>> http://www.ycoln-resources.com
>> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
>> ==============================================
>> To assist you in getting the best answers for FrontPage support see:
>> http://www.net-sites.com/sitebuilder/newsgroups.asp
>>
>> "Stuart" <(E-Mail Removed)> wrote in message
>> newsADA513C-F204-455C-93FF-(E-Mail Removed)...
>> >I have a Database of Staff and in the database is a field Called fldtype.
>> > I have a table that show all the staff but it all start to blend in to a
>> > mess just looking at same colours for everyone.
>> >
>> > I have got the code to give alt row a different color and that helps but
>> > what I really want is some code that will change the Bcolor and or Text color
>> > depending on the field value contained in "fldType"
>> >
>> > IE: If fldtype="Teacher" then Color red or if fldtpye="technician" then
>> > color Green else if fldtype="Admin" then color orange.
>> >
>> > Do you get what I mean.
>> >
>> > I am new to this as I am a Netowrk man not a Web Coder but my School asked
>> > if I could help out as site needs a major over haul.
>> >
>> > Web editor being used is FP2000 and FP2003 at home.
>> >
>> > Thanks
>> > Sturt

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?U3R1YXJ0?=
Guest
Posts: n/a
 
      17th Apr 2005
Did not work all colours stayed the same.

How else can I display all the records and have this color option.

But must be easliy done as I will have to Show pupils in school how it was
done so they can mange it at a later date.


"Thomas A. Rowe" wrote:

> I don't use the FP database components, but doing the following should work.
>
> Replace the following:
>
> <%
> intLineNum = intLineNum + 1
> If intLineNum Mod 2 = 0 Then
> strLineColor = strEvenColor
> Else
> strLineColor = strOddColor
> End If
> %>
>
> With:
>
> <%
> If FP_FieldVal(fp_rs,"fldType") = "Teacher" Then
> strLineColor = "#FF0000" ' red
> ElseIf FP_FieldVal(fp_rs,"fldType") = "Technician" Then
> strLineColor = "#006600" ' green
> ElseIf FP_FieldVal(fp_rs,"fldType") = "Admin" Then
> strLineColor = "#FF9900" ' orange
> Else
> strLineColor = "#FFFFFF" ' white
> End If
> %>
>
> Note the CaSe of Teacher, Technician, etc. in the database must exactly match the text in the equal
> statement above.
>
> --
> ==============================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> ==============================================
> To assist you in getting the best answers for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>
> "Stuart" <(E-Mail Removed)> wrote in message
> news:F4D3557A-3B1C-4DA2-ABA0-(E-Mail Removed)...
> > Here is code with the alt row color
> > <html>
> >
> > <head>
> > <% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not
> > Edit.
> > FP_CharSet = "windows-1252"
> > FP_CodePage = 1252 %>
> > <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> > <title>tblStaffList -- View</title>
> > <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
> > <meta name="ProgId" content="FrontPage.Editor.Document">
> > </head>
> >
> > <body>
> > <%
> > strOddColor = "bgcolor='#FFFFFF'"
> > strEvenColor = "bgcolor='#C0C0C0'"
> > intLineNum = 0
> > %>
> > <table width="100%" border="1">
> > <thead>
> > <tr>
> > <th ALIGN="LEFT"><b>Initials</b></th>
> > <th ALIGN="LEFT"><b>Surname</b></th>
> > <th ALIGN="LEFT"><b>Firstname</b></th>
> > <th ALIGN="LEFT"><b>Staff Type</b></th>
> > <th ALIGN="LEFT"><b>Department</b></th>
> > <th ALIGN="LEFT"><b>Room</b></th>
> > <th ALIGN="LEFT"><b>Other Info</b></th>
> > </tr>
> > </thead>
> > <tbody>
> > <!--webbot bot="DatabaseRegionStart"
> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> > s-columntypes="3,202,202,202,202,202,202,202" s-dataconnection="Stafflist"
> > b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Intials"
> > s-menuvalue="Intials" b-tableborder="TRUE" b-tableexpand="TRUE"
> > b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
> > i-listformat="0" b-makeform="FALSE" s-recordsource="tblStaffList"
> > s-displaycolumns="Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> > s-criteria s-order s-sql="SELECT * FROM tblStaffList" b-procedure="FALSE"
> > clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records
> > returned." i-maxrecords="256" i-groupsize="0" botid="0"
> > u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc"
> > u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64
> > bgcolor="#FFFF00" width="100%"><font color="#000000">This is the start of a
> > Database Results region.</font></td></tr>" b-UseDotNET="FALSE" CurrentExt
> > sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes
> > b-WasTableFormat="TRUE" startspan --><!--#include
> > file="../_fpclass/fpdblib.inc"-->
> > <% if 0 then %>
> > <SCRIPT Language="JavaScript">
> > document.write("<div style='background: yellow; color: black;'>The Database
> > Results component on this page is unable to display database content. The
> > page must have a filename ending in '.asp', and the web must be hosted on a
> > server that supports Active Server Pages.</div>");
> > </SCRIPT>
> > <% end if %>
> > <%
> > fp_sQry="SELECT * FROM tblStaffList"
> > fp_sDefault=""
> > fp_sNoRecords="<tr><td colspan=7 align=""LEFT"" width=""100%"">No records
> > returned.</td></tr>"
> > fp_sDataConn="Stafflist"
> > fp_iMaxRecords=256
> > fp_iCommandType=1
> > fp_iPageSize=0
> > fp_fTableFormat=True
> > fp_fMenuFormat=False
> > fp_sMenuChoice="Intials"
> > fp_sMenuValue="Intials"
> > fp_sColTypes="&ID=3&Intials=202&Surname=202&Firstname=202&fldType=202&Department=202&Room=202&OtherInfo=202&"
> > fp_iDisplayCols=7
> > fp_fCustomQuery=False
> > BOTID=0
> > fp_iRegion=BOTID
> > %>
> > <!--#include file="../_fpclass/fpdbrgn1.inc"-->
> > <!--webbot bot="DatabaseRegionStart" endspan i-checksum="52067" -->
> > <%
> > intLineNum = intLineNum + 1
> > If intLineNum Mod 2 = 0 Then
> > strLineColor = strEvenColor
> > Else
> > strLineColor = strOddColor
> > End If
> > %>
> > <tr <%=strLineColor%>>
> > <td>
> > <!--webbot bot="DatabaseResultColumn"
> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> > s-column="Intials" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
> > clientside b-MenuFormat preview="&lt;font
> > size="-1"><<</font>Intials<font size="-1">>></font>" startspan
> > --><%=FP_FieldVal(fp_rs,"Intials")%><!--webbot bot="DatabaseResultColumn"
> > endspan i-checksum="13821" --></td>
> > <td>
> > <!--webbot bot="DatabaseResultColumn"
> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> > s-column="Surname" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
> > clientside b-MenuFormat preview="<font size="-1"><<</font>Surname<font
> > size="-1">>></font>" startspan
> > --><%=FP_FieldVal(fp_rs,"Surname")%><!--webbot bot="DatabaseResultColumn"
> > endspan i-checksum="15149" --></td>
> > <td>
> > <!--webbot bot="DatabaseResultColumn"
> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> > s-column="Firstname" b-tableformat="TRUE" b-hashtml="FALSE"
> > b-makelink="FALSE" clientside b-MenuFormat preview="<font
> > size="-1"><<</font>Firstname<font size="-1">>></font>" startspan
> > --><%=FP_FieldVal(fp_rs,"Firstname")%><!--webbot bot="DatabaseResultColumn"
> > endspan i-checksum="18968" --></td>
> > <td>
> > <!--webbot bot="DatabaseResultColumn"
> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> > s-column="fldType" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
> > clientside b-MenuFormat preview="<font size="-1"><<</font>fldType<font
> > size="-1">>></font>" startspan
> > --><%=FP_FieldVal(fp_rs,"fldType")%><!--webbot bot="DatabaseResultColumn"
> > endspan i-checksum="15267" --></td>
> > <td>
> > <!--webbot bot="DatabaseResultColumn"
> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> > s-column="Department" b-tableformat="TRUE" b-hashtml="FALSE"
> > b-makelink="FALSE" clientside b-MenuFormat preview="<font
> > size="-1"><<</font>Department<font size="-1">>></font>" startspan
> > --><%=FP_FieldVal(fp_rs,"Department")%><!--webbot bot="DatabaseResultColumn"
> > endspan i-checksum="29735" --></td>
> > <td>
> > <!--webbot bot="DatabaseResultColumn"
> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> > s-column="Room" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
> > clientside b-MenuFormat preview="<font size="-1"><<</font>Room<font
> > size="-1">>></font>" startspan
> > --><%=FP_FieldVal(fp_rs,"Room")%><!--webbot bot="DatabaseResultColumn"
> > endspan i-checksum="5966" --></td>
> > <td>
> > <!--webbot bot="DatabaseResultColumn"
> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
> > s-column="OtherInfo" b-tableformat="TRUE" b-hashtml="FALSE"
> > b-makelink="FALSE" clientside b-MenuFormat preview="<font
> > size="-1"><<</font>OtherInfo<font size="-1">>></font>" startspan
> > --><%=FP_FieldVal(fp_rs,"OtherInfo")%><!--webbot bot="DatabaseResultColumn"
> > endspan i-checksum="21234" --></td>
> > </tr>
> > <!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE"
> > b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0"
> > clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00"
> > width="100%"><font color="#000000">This is the end of a Database Results
> > region.</font></td></tr>" startspan --><!--#include
> > file="../_fpclass/fpdbrgn2.inc"-->
> > <!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
> > </table>
> >
> > <table width="100%" align=left id="table1">
> > <tr>
> > <td width="22%" align=right>
> > <table id="table2">
> > <tr>
> > <td>
> > Results Page
> > | <a href="editor/submission_form.asp" target="_top">Submission Form</a>
> > | <a href="editor/database_editor.asp" target="_top">Database Editor</a>
> > </td>
> > </tr>
> > </table>
> > </td>
> > </tr>
> > </table>
> >
> >
> > </body>
> >
> > </html>
> >
> >
> > "Thomas A. Rowe" wrote:
> >
> >> Can you paste the code that show how you are displaying the records?
> >>
> >> --
> >> ==============================================
> >> Thomas A. Rowe (Microsoft MVP - FrontPage)
> >> WEBMASTER Resources(tm)
> >> http://www.ycoln-resources.com
> >> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >> ==============================================
> >> To assist you in getting the best answers for FrontPage support see:
> >> http://www.net-sites.com/sitebuilder/newsgroups.asp
> >>
> >> "Stuart" <(E-Mail Removed)> wrote in message
> >> newsADA513C-F204-455C-93FF-(E-Mail Removed)...
> >> >I have a Database of Staff and in the database is a field Called fldtype.
> >> > I have a table that show all the staff but it all start to blend in to a
> >> > mess just looking at same colours for everyone.
> >> >
> >> > I have got the code to give alt row a different color and that helps but
> >> > what I really want is some code that will change the Bcolor and or Text color
> >> > depending on the field value contained in "fldType"
> >> >
> >> > IE: If fldtype="Teacher" then Color red or if fldtpye="technician" then
> >> > color Green else if fldtype="Admin" then color orange.
> >> >
> >> > Do you get what I mean.
> >> >
> >> > I am new to this as I am a Netowrk man not a Web Coder but my School asked
> >> > if I could help out as site needs a major over haul.
> >> >
> >> > Web editor being used is FP2000 and FP2003 at home.
> >> >
> >> > Thanks
> >> > Sturt
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      17th Apr 2005
Try changing what I wrote to:

<%
If fp_rs("fldType") = "Teacher" Then
strLineColor = "#FF0000" ' red
ElseIf fp_rs("fldType") = "Technician" Then
strLineColor = "#006600" ' green
ElseIf fp_rs("fldType") = "Admin" Then
strLineColor = "#FF9900" ' orange
Else
strLineColor = "#FFFFFF" ' white
End If
%>

And you did delete the following, correct?

<%
intLineNum = intLineNum + 1
If intLineNum Mod 2 = 0 Then
strLineColor = strEvenColor
Else
strLineColor = strOddColor
End If
%>

The only other way would be to not use the FP database component, and learn to hand code the
ASP/VBscript needed or you have to wait for someone that does use the FP database component to help
you.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Stuart" <(E-Mail Removed)> wrote in message
news:2E7AA431-B6AE-4F89-9AA1-(E-Mail Removed)...
> Did not work all colours stayed the same.
>
> How else can I display all the records and have this color option.
>
> But must be easliy done as I will have to Show pupils in school how it was
> done so they can mange it at a later date.
>
>
> "Thomas A. Rowe" wrote:
>
>> I don't use the FP database components, but doing the following should work.
>>
>> Replace the following:
>>
>> <%
>> intLineNum = intLineNum + 1
>> If intLineNum Mod 2 = 0 Then
>> strLineColor = strEvenColor
>> Else
>> strLineColor = strOddColor
>> End If
>> %>
>>
>> With:
>>
>> <%
>> If FP_FieldVal(fp_rs,"fldType") = "Teacher" Then
>> strLineColor = "#FF0000" ' red
>> ElseIf FP_FieldVal(fp_rs,"fldType") = "Technician" Then
>> strLineColor = "#006600" ' green
>> ElseIf FP_FieldVal(fp_rs,"fldType") = "Admin" Then
>> strLineColor = "#FF9900" ' orange
>> Else
>> strLineColor = "#FFFFFF" ' white
>> End If
>> %>
>>
>> Note the CaSe of Teacher, Technician, etc. in the database must exactly match the text in the
>> equal
>> statement above.
>>
>> --
>> ==============================================
>> Thomas A. Rowe (Microsoft MVP - FrontPage)
>> WEBMASTER Resources(tm)
>> http://www.ycoln-resources.com
>> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
>> ==============================================
>> To assist you in getting the best answers for FrontPage support see:
>> http://www.net-sites.com/sitebuilder/newsgroups.asp
>>
>> "Stuart" <(E-Mail Removed)> wrote in message
>> news:F4D3557A-3B1C-4DA2-ABA0-(E-Mail Removed)...
>> > Here is code with the alt row color
>> > <html>
>> >
>> > <head>
>> > <% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not
>> > Edit.
>> > FP_CharSet = "windows-1252"
>> > FP_CodePage = 1252 %>
>> > <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
>> > <title>tblStaffList -- View</title>
>> > <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
>> > <meta name="ProgId" content="FrontPage.Editor.Document">
>> > </head>
>> >
>> > <body>
>> > <%
>> > strOddColor = "bgcolor='#FFFFFF'"
>> > strEvenColor = "bgcolor='#C0C0C0'"
>> > intLineNum = 0
>> > %>
>> > <table width="100%" border="1">
>> > <thead>
>> > <tr>
>> > <th ALIGN="LEFT"><b>Initials</b></th>
>> > <th ALIGN="LEFT"><b>Surname</b></th>
>> > <th ALIGN="LEFT"><b>Firstname</b></th>
>> > <th ALIGN="LEFT"><b>Staff Type</b></th>
>> > <th ALIGN="LEFT"><b>Department</b></th>
>> > <th ALIGN="LEFT"><b>Room</b></th>
>> > <th ALIGN="LEFT"><b>Other Info</b></th>
>> > </tr>
>> > </thead>
>> > <tbody>
>> > <!--webbot bot="DatabaseRegionStart"
>> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
>> > s-columntypes="3,202,202,202,202,202,202,202" s-dataconnection="Stafflist"
>> > b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="Intials"
>> > s-menuvalue="Intials" b-tableborder="TRUE" b-tableexpand="TRUE"
>> > b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
>> > i-listformat="0" b-makeform="FALSE" s-recordsource="tblStaffList"
>> > s-displaycolumns="Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
>> > s-criteria s-order s-sql="SELECT * FROM tblStaffList" b-procedure="FALSE"
>> > clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records
>> > returned." i-maxrecords="256" i-groupsize="0" botid="0"
>> > u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc"
>> > u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64
>> > bgcolor="#FFFF00" width="100%"><font color="#000000">This is the start of a
>> > Database Results region.</font></td></tr>" b-UseDotNET="FALSE" CurrentExt
>> > sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes
>> > b-WasTableFormat="TRUE" startspan --><!--#include
>> > file="../_fpclass/fpdblib.inc"-->
>> > <% if 0 then %>
>> > <SCRIPT Language="JavaScript">
>> > document.write("<div style='background: yellow; color: black;'>The Database
>> > Results component on this page is unable to display database content. The
>> > page must have a filename ending in '.asp', and the web must be hosted on a
>> > server that supports Active Server Pages.</div>");
>> > </SCRIPT>
>> > <% end if %>
>> > <%
>> > fp_sQry="SELECT * FROM tblStaffList"
>> > fp_sDefault=""
>> > fp_sNoRecords="<tr><td colspan=7 align=""LEFT"" width=""100%"">No records
>> > returned.</td></tr>"
>> > fp_sDataConn="Stafflist"
>> > fp_iMaxRecords=256
>> > fp_iCommandType=1
>> > fp_iPageSize=0
>> > fp_fTableFormat=True
>> > fp_fMenuFormat=False
>> > fp_sMenuChoice="Intials"
>> > fp_sMenuValue="Intials"
>> > fp_sColTypes="&ID=3&Intials=202&Surname=202&Firstname=202&fldType=202&Department=202&Room=202&OtherInfo=202&"
>> > fp_iDisplayCols=7
>> > fp_fCustomQuery=False
>> > BOTID=0
>> > fp_iRegion=BOTID
>> > %>
>> > <!--#include file="../_fpclass/fpdbrgn1.inc"-->
>> > <!--webbot bot="DatabaseRegionStart" endspan i-checksum="52067" -->
>> > <%
>> > intLineNum = intLineNum + 1
>> > If intLineNum Mod 2 = 0 Then
>> > strLineColor = strEvenColor
>> > Else
>> > strLineColor = strOddColor
>> > End If
>> > %>
>> > <tr <%=strLineColor%>>
>> > <td>
>> > <!--webbot bot="DatabaseResultColumn"
>> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
>> > s-column="Intials" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
>> > clientside b-MenuFormat preview="&lt;font
>> > size="-1"><<</font>Intials<font size="-1">>></font>" startspan
>> > --><%=FP_FieldVal(fp_rs,"Intials")%><!--webbot bot="DatabaseResultColumn"
>> > endspan i-checksum="13821" --></td>
>> > <td>
>> > <!--webbot bot="DatabaseResultColumn"
>> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
>> > s-column="Surname" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
>> > clientside b-MenuFormat preview="<font size="-1"><<</font>Surname<font
>> > size="-1">>></font>" startspan
>> > --><%=FP_FieldVal(fp_rs,"Surname")%><!--webbot bot="DatabaseResultColumn"
>> > endspan i-checksum="15149" --></td>
>> > <td>
>> > <!--webbot bot="DatabaseResultColumn"
>> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
>> > s-column="Firstname" b-tableformat="TRUE" b-hashtml="FALSE"
>> > b-makelink="FALSE" clientside b-MenuFormat preview="<font
>> > size="-1"><<</font>Firstname<font size="-1">>></font>" startspan
>> > --><%=FP_FieldVal(fp_rs,"Firstname")%><!--webbot bot="DatabaseResultColumn"
>> > endspan i-checksum="18968" --></td>
>> > <td>
>> > <!--webbot bot="DatabaseResultColumn"
>> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
>> > s-column="fldType" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
>> > clientside b-MenuFormat preview="<font size="-1"><<</font>fldType<font
>> > size="-1">>></font>" startspan
>> > --><%=FP_FieldVal(fp_rs,"fldType")%><!--webbot bot="DatabaseResultColumn"
>> > endspan i-checksum="15267" --></td>
>> > <td>
>> > <!--webbot bot="DatabaseResultColumn"
>> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
>> > s-column="Department" b-tableformat="TRUE" b-hashtml="FALSE"
>> > b-makelink="FALSE" clientside b-MenuFormat preview="<font
>> > size="-1"><<</font>Department<font size="-1">>></font>" startspan
>> > --><%=FP_FieldVal(fp_rs,"Department")%><!--webbot bot="DatabaseResultColumn"
>> > endspan i-checksum="29735" --></td>
>> > <td>
>> > <!--webbot bot="DatabaseResultColumn"
>> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
>> > s-column="Room" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE"
>> > clientside b-MenuFormat preview="<font size="-1"><<</font>Room<font
>> > size="-1">>></font>" startspan
>> > --><%=FP_FieldVal(fp_rs,"Room")%><!--webbot bot="DatabaseResultColumn"
>> > endspan i-checksum="5966" --></td>
>> > <td>
>> > <!--webbot bot="DatabaseResultColumn"
>> > s-columnnames="ID,Intials,Surname,Firstname,fldType,Department,Room,OtherInfo"
>> > s-column="OtherInfo" b-tableformat="TRUE" b-hashtml="FALSE"
>> > b-makelink="FALSE" clientside b-MenuFormat preview="<font
>> > size="-1"><<</font>OtherInfo<font size="-1">>></font>" startspan
>> > --><%=FP_FieldVal(fp_rs,"OtherInfo")%><!--webbot bot="DatabaseResultColumn"
>> > endspan i-checksum="21234" --></td>
>> > </tr>
>> > <!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE"
>> > b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0"
>> > clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00"
>> > width="100%"><font color="#000000">This is the end of a Database Results
>> > region.</font></td></tr>" startspan --><!--#include
>> > file="../_fpclass/fpdbrgn2.inc"-->
>> > <!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody>
>> > </table>
>> >
>> > <table width="100%" align=left id="table1">
>> > <tr>
>> > <td width="22%" align=right>
>> > <table id="table2">
>> > <tr>
>> > <td>
>> > Results Page
>> > | <a href="editor/submission_form.asp" target="_top">Submission Form</a>
>> > | <a href="editor/database_editor.asp" target="_top">Database Editor</a>
>> > </td>
>> > </tr>
>> > </table>
>> > </td>
>> > </tr>
>> > </table>
>> >
>> >
>> > </body>
>> >
>> > </html>
>> >
>> >
>> > "Thomas A. Rowe" wrote:
>> >
>> >> Can you paste the code that show how you are displaying the records?
>> >>
>> >> --
>> >> ==============================================
>> >> Thomas A. Rowe (Microsoft MVP - FrontPage)
>> >> WEBMASTER Resources(tm)
>> >> http://www.ycoln-resources.com
>> >> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
>> >> ==============================================
>> >> To assist you in getting the best answers for FrontPage support see:
>> >> http://www.net-sites.com/sitebuilder/newsgroups.asp
>> >>
>> >> "Stuart" <(E-Mail Removed)> wrote in message
>> >> newsADA513C-F204-455C-93FF-(E-Mail Removed)...
>> >> >I have a Database of Staff and in the database is a field Called fldtype.
>> >> > I have a table that show all the staff but it all start to blend in to a
>> >> > mess just looking at same colours for everyone.
>> >> >
>> >> > I have got the code to give alt row a different color and that helps but
>> >> > what I really want is some code that will change the Bcolor and or Text color
>> >> > depending on the field value contained in "fldType"
>> >> >
>> >> > IE: If fldtype="Teacher" then Color red or if fldtpye="technician" then
>> >> > color Green else if fldtype="Admin" then color orange.
>> >> >
>> >> > Do you get what I mean.
>> >> >
>> >> > I am new to this as I am a Netowrk man not a Web Coder but my School asked
>> >> > if I could help out as site needs a major over haul.
>> >> >
>> >> > Web editor being used is FP2000 and FP2003 at home.
>> >> >
>> >> > Thanks
>> >> > Sturt
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color field depending on person who updated it ... =?Utf-8?B?U01vZWxsZXI=?= Microsoft Access 5 3rd Apr 2006 04:58 AM
Code to change color of field depending on another fields results =?Utf-8?B?U29uZHJh?= Microsoft Access Reports 5 7th May 2005 01:18 PM
Change color depending on cell value Gary Paris Microsoft Excel Programming 7 6th Feb 2005 11:53 PM
change color of columns depending on value van Velzen Microsoft Excel Charting 3 7th Oct 2004 02:37 PM
Change Border Color Depending on URL GS500 Windows XP Internet Explorer 0 22nd Nov 2003 02:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:12 AM.