Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text do not shows

Status
Not open for further replies.

EMax1

MIS
Apr 8, 2004
95
US
I have a table that is embedded in another table. In one cell I have the following code (<%= oRs("Material")%>) that is supposed to retrieve some text from a dataset.
The code is good, but for whatever raison the text do not shows.
If I remove the embedded table and use the same code, the text shows.
I did see this happen one time before, but I don’t remember how to fix it. This text come from a Memo field in an Access Db. I placed the memos rows at the end of the query, but this had no effect has it will with Ms SQL queries.
Any clue?
Thanks in advance.
Louis
 
Try <% = Server.HTMLEncode(oRS("Material")) %>. If this doesn't work, post sample of problematic HTML code - view source, copy&paste, not ASP.
 
I tried and it didn't work.
This is the code for the tables only.
Note, again, that if I remove the embeded table and use the code it;s fine.
Cannot figure it!




Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="Common/exec.css" rel="stylesheet" type="text/css">
</head>
<body>
<center>
  <p> </p> 
  <table width="754" border="0" cellspacing="0" cellpadding="0">
    <!--DWLayoutTable-->
    <tr> 
      <td height="56" colspan="3" align="center" valign="top"><table width="100%" border="0" cellspacing="5" cellpadding="0">
          <!--DWLayoutTable-->
          <tr> 
            <td width="100%" align="left" valign="top">
			  <table width="100%" border="0" cellpadding="0" cellspacing="3" style = "border:none">
                <tr> 
                  <td align="left"><%= oRs("Title") %> - DATA HERE SHOWS</td>
                </tr>
                <tr> 
                  <td height="10">&nbsp;</td>
                </tr>
                <tr> 
                  <td align="left" valign="top" class="NormalTxt"><%= oRs("LongDescript") %> - DATA HERE SHOWS</td>
                </tr>
                <tr> 
                  <td align="left">&nbsp;</td>
                </tr>
                <% if oRs("Material") <> "NA" then  %>
                <tr> 
                  <td align="left" valign="top" ><span class="normalB">Material:</span><span class="NormalTxt"><%= oRs("Material")%> - DATA HERE DO NOT SHOWS</span></td>
                </tr>
                <tr> 
                  <td height="20" align="left">&nbsp;</td>
                </tr>
                <% end if %>
                <% if oRs("Colors") <> "NA" then  %>
                <tr> 
                  <td align="left" valign="top" ><span class="normalB">Color:</span>&nbsp; 
                  </td>
                </tr>
                <tr> 
                  <td align="left">&nbsp;</td>
                </tr>
                <% end if %>
                <% if oRs("Size") <> "NA" then  %>
                <tr> 
                  <td align="left" valign="top" ><span class="normalB">Size:</span>&nbsp; 
                  </td>
                </tr>
                <tr> 
                  <td align="left">&nbsp;</td>
                </tr>
                <% end if %>
                <% if oRs("AdditionalInfo") <> "NA" then  %>
                <tr> 
                  <td align="left" valign="top" ><span class="normalB">Additional 
                    Info:</span>&nbsp;<span class="NormalTxt"> </span></td>
                </tr>
                <tr> 
                  <td align="left">&nbsp;</td>
                </tr>
                <% end if %>
              </table></td>
            <td width="20">&nbsp;</td>
            <td width="290" align="center" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
          </tr>
          <tr>
            <td height="1"><img src="spacer.gif" alt="" width="279" height="1"></td>
            <td></td>
            <td><img src="spacer.gif" alt="" width="280" height="1"></td>
          </tr>
          <tr>
            <td height="5"></td>
            <td><img src="spacer.gif" alt="" width="23" height="1"></td>
            <td><img src="spacer.gif" alt="" width="327" height="1"></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</center>


</body>
</html>
 
Longshot, but could you try changing this:
Code:
<td align="left" valign="top" ><span class="normalB">Material:</span><span class="NormalTxt"><%= oRs("Material")%> - DATA HERE DO NOT SHOWS</span></td>
to:
Code:
<td align="left" valign="top" class="NormalTxt"><span class="normalB">Material:</span><%= oRs("Material")%> - DATA HERE DO NOT SHOWS</td>
 
Okay, maybe a silly question, but...

The absent text is wrapped in an if-statement:

if oRs("Material") <> "NA" then ...

Is it possible that oRs("Material") is equal to "NA"?

--Dave

P.S., if not, what does oRs("Material") come out to be? Does it have a less-than sign in it? (<). If so, replace it with &lt;
 
No, because when he removes the table, it shows up. You may be on to something with the less-than sign. Good call.
 
Hm... works for me, though I don't have CSS file.

What about "NormalTxt" class? Check for cascaded CSS selectors too.
 
Thanks for your clues.

For whatever raison if I change the code

Code:
                <% if oRs("Material") <> "NA" then  %>
                <tr> 
                  <td align="left" valign="top" ><span class="normalB">Material:</span><span class="NormalTxt"><%= oRs("Material")%> - DATA HERE DO NOT SHOWS</span></td>
                </tr>
                <tr> 
                  <td height="20" align="left">&nbsp;</td>
                </tr>
                <% end if %>

to

Code:
                <% if oRs("Material") <> "NA" then  %>
                <tr> 
                  <td align="left" valign="top" ><span class="normalB">Material:</span><span class="NormalTxt"><%= oRs("Material")%> - DATA HERE DO NOT SHOWS</span></td>
                </tr>
                <% end if %>

I do not have any problem.
Go figure. I do not understand why, but I will keep it like this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top