Hi
The code I am using is listed below, my problem is that it will work when running as localhost on my laptop but will not work when running on the server.
I want the code to change the background colour of a table according to the profit or loss in a contract. The figure is obtained from a query and then I assign this value to a variable "profitloss" and then depending on the value change the colour accordingly.
As I said earlier I cannot understand why it work on my laptop but not the server. Is there a setting within IIS or is my code wrong?
Thanks for any help
Peter
Part of code as follows:
oRs.Open strSQL, conn
While Not oRs.EOF
profitloss=oRs("PL")
bgPL="#2008FD"
%>
<form name="frmResult">
<%
IF profitloss < -1000.00 THEN %>
<table border="1" width="848" bgcolor="#FBA2A8" cellpadding="1" cellspacing="1">
<tr>
<td colspan="4" align="center"><font size="4" color="<%=bgPL%>" ><b><%=oRs("Operator")%></b></font></td>
</tr>
<tr>
<td width="50%" align="center"><font size="4" color="<%=bgPL%>"><b><%=oRs("REG NO")%></b></font></td>
<td width="50%" align="center"><font size="4" color="<%=bgPL%>"><b><%=oRs("CONT TYPE")%></b></font></td>
</tr>
</table>
<% ELSEIF profitloss > -1000.00 THEN %>
<table border="1" width="848" bgcolor="#91FB88" cellpadding="1" cellspacing="1">
<tr>
<td colspan="4" align="center"><font size="4" color="<%=bgPL%>"><b><%=oRs("Operator")%></b></font></td>
</tr>
<tr>
<td width="50%" align="center"><font size="4" color="<%=bgPL%>"><b><%=oRs("REG NO")%></b></font></td>
<td width="50%" align="center"><font size="4" color="<%=bgPL%>"><b><%=oRs("CONT TYPE")%></b></font></td>
</tr>
</table>
<% ELSE %>
<table border="1" width="848" bgcolor="#FCFBFB" cellpadding="1" cellspacing="1">
<tr>
<td colspan="4" align="center"><font size="4" color="<%=bgPL%>"><b><%=oRs("Operator")%></b></font></td>
</tr>
<tr>
<td width="50%" align="center"><font size="4" color="<%=bgPL%>"><b><%=oRs("REG NO")%></b></font></td>
<td width="50%" align="center"><font size="4" color="<%=bgPL%>"><b><%=oRs("CONT TYPE")%></b></font></td>
</tr>
</table>
<% END IF %>