| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Code data problem
I left out some code that wont make a difference, anyway this code works great in ie but not netscape, what is wrong?
<% sql="SELECT * FROM tblnav_bar" RS.Open sql, strconn, 3, 3 %> <% link1 = "#99ff66" link2 = "pink" link3 = "#66ffff" link4 = "#ffff99" link5 = "lavender" i=1 rs.fields("link") = blank %> <table border="0" width="100%" id="tablea"> <tr> <td width="50%" valign=middle><a href=default.asp><font class="title">P.S. Bliss Cards</font></a></td> <td width="50%" valign=bottom align=left><p align="right"><font class=title2>Handmade Greeting Cards & Prints</font></td> </tr> </table> <table border="0" id="tableb" cellspacing="5" cellpadding="7"> <tr> <% i=1 do until rs.eof %> <% if rs.fields("link") <> "" then %> <td height=10 style="background: <% if i=1 then response.write(link1) elseif i=2 then response.write(link2) elseif i=3 then response.write(link3) elseif i=4 then response.write(link4) elseif i=5 then response.write(link5) end if %>;"><a href=<%= rs.fields("link") %>><font class="table-nav"><%= rs.fields("bartext") %></font></a></td> <% else %> <td height=10 style="background: <% if i=1 then response.write(link1) elseif i=2 then response.write(link2) elseif i=3 then response.write(link3) elseif i=4 then response.write(link4) elseif i=5 then response.write(link5) end if %>;" onmouseover="showtable table<%= i %>"><font class="table-nav"><%= rs.fields("bartext") %></font></td> <% end if %> <% i=i+1 rs.movenext loop rs.movefirst %> </tr> </table> <table border=0> <% i=1 do until i = 3 %> <% rs.close sql="SELECT * FROM tblsub_bar" & i RS.Open sql, strconn, 3, 3 %> <table border="0" id="table<%= i %>" cellspacing="5" cellpadding="2" style="visibility: hidden; position:absolute;"> <tr> <% do until rs.eof %> <td height=10 style="background: <% if i=1 then response.write(link1) elseif i=2 then response.write(link2) elseif i=3 then response.write(link3) elseif i=4 then response.write(link4) elseif i=5 then response.write(link5) end if %>;"><a href=cards.asp?cat=<%= rs.fields("bartext") %>&base=<%= i %>&pg=1><font class=table><%= rs.fields("bartext") %></font></a></td> <% rs.movenext loop %> </tr> </table> <% i=i+1 loop %> </table> <table width=100%><tr><td align=right> <% if request.cookies("cartnum") = "" then %> <input type="text" name="txtCartNum" value="Cart Number" style="background=#fefefe;width=150" onclick="clearthis(this)" size="20"><br> <button style="background=#fefefe;width=150" onclick="docart()"><img src=images/cart.jpg></button> <% else %> <font color=white>Cart Number <%= request.cookies("cartnum") %>.</font><br> <button style="background=#fefefe;width=150" onclick="viewcart()"><img src=images/cart.jpg></button> <% end if %> <br><font color=white face=verdana style="font-size: 10pt">Search by Occasion: </font> <select name=ddown> <% rs.close sql="SELECT * FROM xref ORDER BY text ASC" RS.Open sql, strconn, 3, 3 %> <% do until rs.eof %> <option value=<%= rs.fields("text") %>><%= rs.fields("text") %></option> <% rs.movenext loop %> |
|
#2
|
|||
|
|||
|
Just a thought. Perhaps Netscape is getting confused with the 'IF' for setting the TD style. Could do it before the TD.
Code:
do until rs.eof
if i=1 then
strColor = "#99ff66;"
elseif i=2 then
strColor = "Pink;"
elseif i=3 then
strColor = "#66ffff;"
elseif i=4 then
strColor = "#ffff99;"
elseif i=5 then
strColor = "Lavender;"
end if
if rs.fields("link") <> "" then %>
<td height=10 style="background: <%=strColor%>">
<a href=<%= rs.fields("link") %>><font class="table-nav"><%= rs.fields("bartext") %></font></a>
</td>
|
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Code data problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|