display beginning of memo field? (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


sgreen0 -> display beginning of memo field? (8/28/2005 2:38:20)

Is there a way (in a database result page) to display only the first, say, 100 characters of a memo field with a "more" link to open the remainder of the memo if clicked?

Perferably the full memo field would display in the same cell where the truncated memo was displayed...

Thanks.

Stephen




BeTheBall -> RE: display beginning of memo field? (8/28/2005 13:03:18)

How many records do you display on your results page?




sgreen0 -> RE: display beginning of memo field? (8/28/2005 13:09:46)

Duane!

There could be quite a few records in the results.

You can take a look at:

http://www.anmt.org/members/ANMT_Collaborators_Corner.asp

You can see that the results list is quite long. I have been planning to paginate the results...

But the memo fields can be VERY long.

Thanks.

Stephen




BeTheBall -> RE: display beginning of memo field? (8/28/2005 13:19:16)

I would lean toward a javascript solution. Otherwise, you are making another trip to the server each time a user clicks the "more" option. Plus I can't think of a way where expanding one record's display wouldn't expand it for all records. My javascript skills are coming along, but I don't have a ready made solution. Let me see what I can find and I will post back.




sgreen0 -> RE: display beginning of memo field? (8/28/2005 13:25:53)

Thanks. I'll do some searching as well...

Stephen




Spooky -> RE: display beginning of memo field? (8/28/2005 15:35:29)

Like so?

http://www.frontpagewebmaster.com/m-191946/key-left%252Cmemo/tm.htm#191949

http://www.frontpagewebmaster.com/m-193013/key-left%252Cmemo/tm.htm#193013




sgreen0 -> RE: display beginning of memo field? (8/28/2005 15:52:12)

Spooky!

If I were to limit the display to the first, say, 60 characters of the memo field, I'd like to be able to add a link that would display the rest if clicked.

Also, It would nee to operate on only ONE record at a time.

Something like this:

Results of database query which includes a memo field:

Name Comment

Sam This is my comment. it goes on for days and days... <click here for more>
Jim And this is mine. It's long, too... <click here for more>

What do you think?

Stephen




Spooky -> RE: display beginning of memo field? (8/28/2005 15:56:10)

<%
If len(MemoField) > 100 then

response.write left(MemoField,100) &"..."<a href='more.asp?ID="&IDField&"'>more</a>"

else

response.write MemoField

end if
%>




sgreen0 -> RE: display beginning of memo field? (8/28/2005 16:02:53)

Now we're getting somewhere. This goes to another page. It's probably impossible to have it expand in its own cell in the table.

How about a small vertically scrolling pop-up that could be closed when done reading?

Stephen




Spooky -> RE: display beginning of memo field? (8/28/2005 16:42:00)

You would need to integrate that same theory with a javascript expand / collapse script




BeTheBall -> RE: display beginning of memo field? (8/28/2005 17:05:48)

This isn't the greatest example because the db table I used doesn't have a memo field, but have a look here:

http://www.thatswhatido.net/Truncate_Memo_with_Javascript.asp

You will note that when the page loads, only the first three digits of the mileage appear. However, you can toggle between the full mileage and the truncated mileage with the click of a link. Is this what you are after?




sgreen0 -> RE: display beginning of memo field? (8/28/2005 17:30:31)

Duane!

That's fabulous!

If only I understood any of what you wrote to make it work.

OK, not knowing what I'm doing, I copied the script up top and used these lines to display the field "FP_FieldHTML(fp_rs,"ProjectDescription").

      <td id="part1" style="display:inline"><script type="text/javascript">document.write(Left(FP_FieldHTML(fp_rs,"ProjectDescription"),150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part1\").style.display=\"none\";document.getElementById(\"full1\").style.display=\"inline\"'>more. . .</a>")</script> </td>
      <td id="full1" style="display:none"><script type="text/javascript">document.write(FP_FieldHTML(fp_rs,"ProjectDescription")+" <a href='javascript:void(0)' onclick='document.getElementById(\"full1\").style.display=\"none\";document.getElementById(\"part1\").style.display=\"inline\"'>collapse. . .</a>")</script> </td>


This doesn't work. I'ts certainly because I have no idea how to adapt your lines to my needs. Is it as simple as a punctuation thing?

Thanks so much.

Stephen




BeTheBall -> RE: display beginning of memo field? (8/28/2005 17:43:16)

The ids are very important and they are NOT hard-coded, but are dynamically generated. Post the code for your page and I will show you the other changes you need.




sgreen0 -> RE: display beginning of memo field? (8/28/2005 17:50:46)

Duane!

Here is the page.

There are four DR's. I've only edited the first trying to use your code.

Thanks for your help.

Stephen

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>ANMT Collaborators Corner</title>
<script type="text/javascript">
function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}
</script>

</head>

<body>

<p align="center"><b><font size="6">ANMT C</font></b><font size="6"><b>ollaborators 
Corner</b></font></p>

<p align="center">
<i><b><a href="members">Back to Members Home Page</a></b></i>
  
<p align="center" style="margin-top: 6; margin-bottom: 0">
Welcome to the ANMT Collaborators Corner!<br>
This listing will give you some information on the projects your fellow members 
are working on -<br>
and will also give you a chance to find a project to get involved with<br>
or find collaborators for your own project.<br>
Please feel free to get in touch with any of these writers<br>
if you are interested in joining or finding out more about their project<br>
(you will find their contact information on the Member Roster)<br>
<br>
Use the drop-down box below to help refine your collaborator search.

  <form method="POST" action="ANMT_Collaborators_Corner_save2.asp">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><select size="1" name="CraftChoice">
    <option <%If request.form("CraftChoice")="All Projects" then response.write "selected"%>>All Projects</option>
    <option <%If request.form("CraftChoice")="Projects Looking for Bookwriter" then response.write "selected"%>>Projects Looking for Bookwriter</option>
    <option <%If request.form("CraftChoice")="Projects Looking for Composer" then response.write "selected"%>>Projects Looking for Composer</option>
    <option <%If request.form("CraftChoice")="Projects Looking for Lyricist" then response.write "selected"%>>Projects Looking for Lyricist</option>
    </select><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
 <nobr>
<% If request.form("CraftChoice")= "All Projects" Then %>
<p align="center"><i><b><font size="4">Filtered for <%=request.form("CraftChoice")%></font></b></i></p>
<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>Project Name</b></td>
      <td><b>Project Type</b></td>
      <td><b>Project Credit</b></td>
      <td><b>Greenlight</b></td>
      <td><b>Project Description</b></td>
      <td colspan="3"><b>Collaborators Needed</b></td>
    </tr>
  </thead>
  <tbody>
    <!--#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 Projects.ProjectID, Projects.ProjectCalendarID, Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName, Projects.Show, Projects.ARCtor, Projects.Greenlight, Projects.ProjectDescription, Projects.[Project Credit], Projects.Bookwriter, Projects.Lyricist, Projects.Composer, Projects.ProjectEndDate FROM Projects WHERE (Show = -1) AND IsNull(ProjectEndDate) ORDER BY Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName"
fp_sDefault="ProjectID="
fp_sNoRecords="<tr><td colspan=8 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="academy"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ProjectID=3&ProjectCalendarID=3&ProjectType=202&ProjectGroup=202&ProjectName=202&Show=11&ARCtor=11&Greenlight=11&ProjectDescription=203&Project Credit=203&Bookwriter=11&Lyricist=11&Composer=11&ProjectEndDate=135&"
fp_iDisplayCols=8
fp_fCustomQuery=True
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<tr>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"ProjectName")%> </td>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"ProjectType")%> </td>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"Project Credit")%> </td>
      <td valign="top">
<% If FP_Field(fp_rs,"Greenlight") <> 0 Then
      response.write "Yes"
      End If
      If FP_Field(fp_rs,"Greenlight") = 0 Then
      response.write "No"
      End If%>  </td>
      <td valign="top">
      <td id="part1" style="display:inline"><script type="text/javascript">document.write(Left(FP_FieldHTML(fp_rs,"ProjectDescription"),150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part1\").style.display=\"none\";document.getElementById(\"full1\").style.display=\"inline\"'>more. . .</a>")</script> </td>
      <td id="full1" style="display:none"><script type="text/javascript">document.write(FP_FieldHTML("fp_rs,ProjectDescription")+" <a href='javascript:void(0)' onclick='document.getElementById(\"full1\").style.display=\"none\";document.getElementById(\"part1\").style.display=\"inline\"'>collapse. . .</a>")</script> </td>
  <td valign="top">
      <% If FP_Field(fp_rs,"Bookwriter") = 0 Then
      response.write "Bookwriter Needed"
      End If %>  </td>
      <td valign="top">
      <% If FP_Field(fp_rs,"Lyricist") = 0 Then 
      response.write "Lyricist Needed"
      End If %>  </td>
      <td valign="top">
      <%If FP_Field(fp_rs,"Composer") = 0 Then
      response.write "Composer Needed"
      End If %>  </td>

    </tr>
    <!--#include file="../_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>

<% End If %>

<% If request.form("CraftChoice")= "Projects Looking for Bookwriter" Then %>
<p align="center"><i><b><font size="4">Filtered for <%=request.form("CraftChoice")%></font></b></i></p>

<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>Project Name</b></td>
      <td><b>Project Type</b></td>
      <td><b>Project Credit</b></td>
      <td><b>Greenlight</b></td>
      <td><b>Project Description</b></td>
      <td colspan="3"><b>Collaborators Needed</b></td>
    </tr>
  </thead>
  <tbody>
    <!--#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 Projects.ProjectID, Projects.ProjectCalendarID, Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName, Projects.Show, Projects.ARCtor, Projects.Greenlight, Projects.ProjectDescription, Projects.[Project Credit], Projects.Bookwriter, Projects.Lyricist, Projects.Composer, Projects.ProjectEndDate FROM Projects WHERE (Projects.Bookwriter = 0) AND (Show = -1) AND IsNull(ProjectEndDate) ORDER BY Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName"
fp_sDefault="ProjectID="
fp_sNoRecords="<tr><td colspan=8 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="academy"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ProjectID=3&ProjectCalendarID=3&ProjectType=202&ProjectGroup=202&ProjectName=202&Show=11&ARCtor=11&Greenlight=11&ProjectDescription=203&Project Credit=203&Bookwriter=11&Lyricist=11&Composer=11&ProjectEndDate=135&"
fp_iDisplayCols=8
fp_fCustomQuery=True
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<tr>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"ProjectName")%> </td>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"ProjectType")%> </td>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"Project Credit")%> </td>
      <td valign="top">
<% If FP_Field(fp_rs,"Greenlight") <> 0 Then
      response.write "Yes"
      End If
      If FP_Field(fp_rs,"Greenlight") = 0 Then
      response.write "No"
      End If%>  </td>
      <td valign="top">
      <%=FP_Field(fp_rs,"ProjectDescription")%>  </td>
      <td valign="top">
      <% If FP_Field(fp_rs,"Bookwriter") = 0 Then
      response.write "Bookwriter Needed"
      End If %>  </td>
      <td valign="top">
      <% If FP_Field(fp_rs,"Lyricist") = 0 Then 
      response.write "Lyricist Needed"
      End If %>  </td>
      <td valign="top">
      <%If FP_Field(fp_rs,"Composer") = 0 Then
      response.write "Composer Needed"
      End If %>  </td>

    </tr>
    <!--#include file="../_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>

<% End If %>

<% If request.form("CraftChoice")= "Projects Looking for Composer" Then %>
<p align="center"><i><b><font size="4">Filtered for <%=request.form("CraftChoice")%></font></b></i></p>

<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>Project Name</b></td>
      <td><b>Project Type</b></td>
      <td><b>Project Credit</b></td>
      <td><b>Greenlight</b></td>
      <td><b>Project Description</b></td>
      <td colspan="3"><b>Collaborators Needed</b></td>
    </tr>
  </thead>
  <tbody>
    <!--#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 Projects.ProjectID, Projects.ProjectCalendarID, Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName, Projects.Show, Projects.ARCtor, Projects.Greenlight, Projects.ProjectDescription, Projects.[Project Credit], Projects.Bookwriter, Projects.Lyricist, Projects.Composer, Projects.ProjectEndDate FROM Projects WHERE (Projects.Composer = 0) AND (Show = -1) AND IsNull(ProjectEndDate) ORDER BY Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName"
fp_sDefault="ProjectID="
fp_sNoRecords="<tr><td colspan=8 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="academy"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ProjectID=3&ProjectCalendarID=3&ProjectType=202&ProjectGroup=202&ProjectName=202&Show=11&ARCtor=11&Greenlight=11&ProjectDescription=203&Project Credit=203&Bookwriter=11&Lyricist=11&Composer=11&ProjectEndDate=135&"
fp_iDisplayCols=8
fp_fCustomQuery=True
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<tr>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"ProjectName")%> </td>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"ProjectType")%> </td>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"Project Credit")%> </td>
      <td valign="top">
<% If FP_Field(fp_rs,"Greenlight") <> 0 Then
      response.write "Yes"
      End If
      If FP_Field(fp_rs,"Greenlight") = 0 Then
      response.write "No"
      End If%>  </td>
      <td valign="top">
      <%=FP_Field(fp_rs,"ProjectDescription")%>  </td>
      <td valign="top">
      <% If FP_Field(fp_rs,"Bookwriter") = 0 Then
      response.write "Bookwriter Needed"
      End If %>  </td>
      <td valign="top">
      <% If FP_Field(fp_rs,"Lyricist") = 0 Then 
      response.write "Lyricist Needed"
      End If %>  </td>
      <td valign="top">
      <%If FP_Field(fp_rs,"Composer") = 0 Then
      response.write "Composer Needed"
      End If %>  </td>

    </tr>
    <!--#include file="../_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>

<% End If %>

<% If request.form("CraftChoice")= "Projects Looking for Lyricist" Then %>
<p align="center"><i><b><font size="4">Filtered for <%=request.form("CraftChoice")%></font></b></i></p>

<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>Project Name</b></td>
      <td><b>Project Type</b></td>
      <td><b>Project Credit</b></td>
      <td><b>Greenlight</b></td>
      <td><b>Project Description</b></td>
      <td colspan="3"><b>Collaborators Needed</b></td>
    </tr>
  </thead>
  <tbody>
    <!--#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 Projects.ProjectID, Projects.ProjectCalendarID, Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName, Projects.Show, Projects.ARCtor, Projects.Greenlight, Projects.ProjectDescription, Projects.[Project Credit], Projects.Bookwriter, Projects.Lyricist, Projects.Composer, Projects.ProjectEndDate FROM Projects WHERE (Projects.Lyricist = 0) AND (Show = -1) AND IsNull(ProjectEndDate) ORDER BY Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName"
fp_sDefault="ProjectID="
fp_sNoRecords="<tr><td colspan=8 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="academy"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ProjectID=3&ProjectCalendarID=3&ProjectType=202&ProjectGroup=202&ProjectName=202&Show=11&ARCtor=11&Greenlight=11&ProjectDescription=203&Project Credit=203&Bookwriter=11&Lyricist=11&Composer=11&ProjectEndDate=135&"
fp_iDisplayCols=8
fp_fCustomQuery=True
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<tr>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"ProjectName")%> </td>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"ProjectType")%> </td>
      <td valign="top">
      <%=FP_FieldVal(fp_rs,"Project Credit")%> </td>
      <td valign="top">
<% If FP_Field(fp_rs,"Greenlight") <> 0 Then
      response.write "Yes"
      End If
      If FP_Field(fp_rs,"Greenlight") = 0 Then
      response.write "No"
      End If%>  </td>
      <td valign="top">
      <%=FP_Field(fp_rs,"ProjectDescription")%>  </td>
      <td valign="top">
      <% If FP_Field(fp_rs,"Bookwriter") = 0 Then
      response.write "Bookwriter Needed"
      End If %>  </td>
      <td valign="top">
      <% If FP_Field(fp_rs,"Lyricist") = 0 Then 
      response.write "Lyricist Needed"
      End If %>  </td>
      <td valign="top">
      <%If FP_Field(fp_rs,"Composer") = 0 Then
      response.write "Composer Needed"
      End If %>  </td>

    </tr>
    <!--#include file="../_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>

<% End If %>

<p align="center">
<i><b><a href="members">Back to Members Home Page</a></b></i></body></html>




BeTheBall -> RE: display beginning of memo field? (8/28/2005 18:24:54)

I am just pasting your first DRW as that is where the changes are. What I have done is include a counter that increments by one as each row of data is displayed. We then use that counter as part of the id of the table column. This ensures that each id is unique. We are simply creating two versions of the column, one with full text and one with 150 characters only. As we click the link, one or the other appears. I have bolded what I added.

<!--#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 %>
<%
counter = 0
fp_sQry="SELECT Projects.ProjectID, Projects.ProjectCalendarID, Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName, Projects.Show, Projects.ARCtor, Projects.Greenlight, Projects.ProjectDescription, Projects.[Project Credit], Projects.Bookwriter, Projects.Lyricist, Projects.Composer, Projects.ProjectEndDate FROM Projects WHERE (Show = -1) AND IsNull(ProjectEndDate) ORDER BY Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName"
fp_sDefault="ProjectID="
fp_sNoRecords="<tr><td colspan=8 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="academy"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ProjectID=3&ProjectCalendarID=3&ProjectType=202&ProjectGroup=202&ProjectName=202&Show=11&ARCtor=11&Greenlight=11&ProjectDescription=203&Project Credit=203&Bookwriter=11&Lyricist=11&Composer=11&ProjectEndDate=135&"
fp_iDisplayCols=8
fp_fCustomQuery=True
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<%counter = counter + 1%>
<tr>
<td valign="top">
<%=FP_FieldVal(fp_rs,"ProjectName")%> </td>
<td valign="top">
<%=FP_FieldVal(fp_rs,"ProjectType")%> </td>
<td valign="top">
<%=FP_FieldVal(fp_rs,"Project Credit")%> </td>
<td valign="top">
<% If FP_Field(fp_rs,"Greenlight") <> 0 Then
response.write "Yes"
End If
If FP_Field(fp_rs,"Greenlight") = 0 Then
response.write "No"
End If%> </td>
<td valign="top">
<td id="part<%=counter%>" style="display:inline"><script type="text/javascript">document.write(Left(FP_FieldHTML(fp_rs,"ProjectDescription"),150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script> </td>
<td id="full<%=counter%>" style="display:none"><script type="text/javascript">document.write(FP_FieldHTML("fp_rs,ProjectDescription")+" <a href='javascript:void(0)' onclick='document.getElementById(\"full<%=counter%>\").style.display=\"none\";document.getElementById(\"part<%=counter%>\").style.display=\"inline\"'>collapse. . .</a>")</script> </td>
<td valign="top">
<% If FP_Field(fp_rs,"Bookwriter") = 0 Then
response.write "Bookwriter Needed"
End If %> </td>
<td valign="top">
<% If FP_Field(fp_rs,"Lyricist") = 0 Then
response.write "Lyricist Needed"
End If %> </td>
<td valign="top">
<%If FP_Field(fp_rs,"Composer") = 0 Then
response.write "Composer Needed"
End If %> </td>

</tr>
<!--#include file="../_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>

<% End If %>

I am on my way out the door, but will check in later this evening in case something doesn't work. Good luck!




sgreen0 -> RE: display beginning of memo field? (8/28/2005 23:30:18)

Duane!

Thanks for your efforts. I inserted your code in the first IF statement (All Projects) and published. The Project Description field came up blank!

Take a look at:

http://www.anmt.org/members/ANMT_Collaborators_Corner_save2.asp

The other If statements work as before.

Hmmm...

S.




BeTheBall -> RE: display beginning of memo field? (8/29/2005 9:48:55)

Looks like I missed one step. Find this block of code:

<td id="part<%=counter%>" style="display:inline"><script type="text/javascript">document.write(Left(FP_FieldHTML(fp_rs,"ProjectDescription"),150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script> </td>
<td id="full<%=counter%>" style="display:none"><script type="text/javascript">document.write(FP_FieldHTML("fp_rs,ProjectDescription")+" <a href='javascript:void(0)' onclick='document.getElementById(\"full<%=counter%>\").style.display=\"none\";document.getElementById(\"part<%=counter%>\").style.display=\"inline\"'>collapse. . .</a>")</script> </td>

Replace with:

<td id="part<%=counter%>" style="display:inline"><script type="text/javascript">document.write(Left(<%=FP_FieldHTML(fp_rs,"ProjectDescription"%>),150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script> </td>
<td id="full<%=counter%>" style="display:none"><script type="text/javascript">document.write(<%=FP_FieldHTML(fp_rs,"ProjectDescription")%>+" <a href='javascript:void(0)' onclick='document.getElementById(\"full<%=counter%>\").style.display=\"none\";document.getElementById(\"part<%=counter%>\").style.display=\"inline\"'>collapse. . .</a>")</script> </td>

Besides adding the script delimiters, notice you had a misplaced double quote in the second instance of FP_FieldHTML(fp_rs,"ProjectDescription"). You had the first double quote before fp_rs.




sgreen0 -> RE: display beginning of memo field? (8/29/2005 11:41:58)

Good Morning!

I had noticed the misplaced quotes yesterday.

I replaced the code as you suggested. I got this error:

Microsoft VBScript compilation error '800a03ee'
Expected ')'
/members/ANMT_Collaborators_Corner_save2.asp, line 116
Response.Write(FP_FieldHTML(fp_rs,"ProjectDescription")
------------------------------------------------------------------------^

If the count is right, Line 116 is the first of the two lines you gave me. I tried adding a close parens, but the error persisted. The code is back to your latest suggestion.

Thanks for this.

Stephen




BeTheBall -> RE: display beginning of memo field? (8/29/2005 13:19:21)

There is a ) out of place here:

<script type="text/javascript">document.write(Left(<%=FP_FieldHTML(fp_rs,"ProjectDescription"%>),150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script>

Move it to here:

<script type="text/javascript">document.write(Left(<%=FP_FieldHTML(fp_rs,"ProjectDescription")%>,150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script>




sgreen0 -> RE: display beginning of memo field? (8/30/2005 0:17:28)

Sorry, Duane.

The field still comes up blank. All other fields work fine. Take a look at:

http://www.anmt.org/members/ANMT_Collaborators_Corner_save2.asp

Hmmm...

Stephen




BeTheBall -> RE: display beginning of memo field? (8/30/2005 12:57:36)

Does your memo field contain HTML? If so, I am stuck as I cannot seem to get this to work on one of my memo fields that contains HTML. If not, paste the code as it now stands.




sgreen0 -> RE: display beginning of memo field? (8/30/2005 13:12:32)

Duane!

Just to be clear, here is the code as it now stands:

<td id="part<%=counter%>" style="display:inline"><script type="text/javascript">document.write(Left(<%=FP_FieldHTML(fp_rs,"ProjectDescription")%>,150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script>  </td> 
<td id="full<%=counter%>" style="display:none"><script type="text/javascript">document.write(<%=FP_FieldHTML(fp_rs,"ProjectDescription")%>+" <a href='javascript:void(0)' onclick='document.getElementById(\"full<%=counter%>\").style.display=\"none\";document.getElementById(\"part<%=counter%>\").style.display=\"inline\"'>collapse. . .</a>")</script>  </td> 


All I get is a blank column.

If the above code is correct, perhaps it has something to do with the implementation of <%counter%>...

Here is the page code for the section we're struggling with:

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>ANMT Collaborators Corner</title>
<script type="text/javascript">
function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}
</script>

</head>

<body>

<p align="center"><b><font size="6">ANMT C</font></b><font size="6"><b>ollaborators 
Corner</b></font></p>

<p align="center">
<i><b><a href="../members">Back to Members Home Page</a></b></i>
  
<p align="center" style="margin-top: 6; margin-bottom: 0">
Welcome to the ANMT Collaborators Corner!<br>
This listing will give you some information on the projects your fellow members 
are working on -<br>
and will also give you a chance to find a project to get involved with<br>
or find collaborators for your own project.<br>
Please feel free to get in touch with any of these writers<br>
if you are interested in joining or finding out more about their project<br>
(you will find their contact information on the Member Roster)<br>
<br>
Use the drop-down box below to help refine your collaborator search.

  <form method="POST" action="ANMT_Collaborators_Corner_save2.asp">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><select size="1" name="CraftChoice">
    <option <%If request.form("CraftChoice")="All Projects" then response.write "selected"%>>All Projects</option>
    <option <%If request.form("CraftChoice")="Projects Looking for Bookwriter" then response.write "selected"%>>Projects Looking for Bookwriter</option>
    <option <%If request.form("CraftChoice")="Projects Looking for Composer" then response.write "selected"%>>Projects Looking for Composer</option>
    <option <%If request.form("CraftChoice")="Projects Looking for Lyricist" then response.write "selected"%>>Projects Looking for Lyricist</option>
    </select><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
 <nobr>
<% If request.form("CraftChoice")= "All Projects" Then %>
<p align="center"><i><b><font size="4">Filtered for <%=request.form("CraftChoice")%></font></b></i></p>
<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>Project Name</b></td>
      <td><b>Project Type</b></td>
      <td><b>Project Credit</b></td>
      <td><b>Greenlight</b></td>
      <td><b>Project Description</b></td>
      <td colspan="3"><b>Collaborators Needed</b></td>
    </tr>
  </thead>
  <tbody>
<!--#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 %> 
<% 
counter = 0 
fp_sQry="SELECT Projects.ProjectID, Projects.ProjectCalendarID, Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName, Projects.Show, Projects.ARCtor, Projects.Greenlight, Projects.ProjectDescription, Projects.[Project Credit], Projects.Bookwriter, Projects.Lyricist, Projects.Composer, Projects.ProjectEndDate FROM Projects WHERE (Show = -1) AND IsNull(ProjectEndDate) ORDER BY Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName" 
fp_sDefault="ProjectID=" 
fp_sNoRecords="<tr><td colspan=8 align=left width=""100%"">No records returned.</td></tr>" 
fp_sDataConn="academy" 
fp_iMaxRecords=256 
fp_iCommandType=1 
fp_iPageSize=0 
fp_fTableFormat=True 
fp_fMenuFormat=False 
fp_sMenuChoice="" 
fp_sMenuValue="" 
fp_sColTypes="&ProjectID=3&ProjectCalendarID=3&ProjectType=202&ProjectGroup=202&ProjectName=202&Show=11&ARCtor=11&Greenlight=11&ProjectDescription=203&Project Credit=203&Bookwriter=11&Lyricist=11&Composer=11&ProjectEndDate=135&" 
fp_iDisplayCols=8 
fp_fCustomQuery=True 
BOTID=1 
fp_iRegion=BOTID 
%> 
<!--#include file="../_fpclass/fpdbrgn1.inc"--> 
<%counter = counter + 1%> 
<tr> 
<td valign="top"> 
<%=FP_FieldVal(fp_rs,"ProjectName")%>  </td> 
<td valign="top"> 
<%=FP_FieldVal(fp_rs,"ProjectType")%>  </td> 
<td valign="top"> 
<%=FP_FieldVal(fp_rs,"Project Credit")%>  </td> 
<td valign="top"> 
<% If FP_Field(fp_rs,"Greenlight") <> 0 Then 
response.write "Yes" 
End If 
If FP_Field(fp_rs,"Greenlight") = 0 Then 
response.write "No" 
End If%>  </td> 
<td valign="top"> 
<td id="part<%=counter%>" style="display:inline"><script type="text/javascript">document.write(Left(<%=FP_FieldHTML(fp_rs,"ProjectDescription")%>,150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script>  </td> 
<td id="full<%=counter%>" style="display:none"><script type="text/javascript">document.write(<%=FP_FieldHTML(fp_rs,"ProjectDescription")%>+" <a href='javascript:void(0)' onclick='document.getElementById(\"full<%=counter%>\").style.display=\"none\";document.getElementById(\"part<%=counter%>\").style.display=\"inline\"'>collapse. . .</a>")</script>  </td> 
<td valign="top"> 
<% If FP_Field(fp_rs,"Bookwriter") = 0 Then 
response.write "Bookwriter Needed" 
End If %>  </td> 
<td valign="top"> 
<% If FP_Field(fp_rs,"Lyricist") = 0 Then 
response.write "Lyricist Needed" 
End If %>  </td> 
<td valign="top"> 
<%If FP_Field(fp_rs,"Composer") = 0 Then 
response.write "Composer Needed" 
End If %>  </td> 

</tr> 
<!--#include file="../_fpclass/fpdbrgn2.inc"--> 
</tbody> 
</table> 

<% End If %>


Thanks for your help.

Stephen




BeTheBall -> RE: display beginning of memo field? (8/30/2005 13:24:29)

Try this:

<td id="part<%=counter%>" style="display:inline"><script type="text/javascript">document.write(Left('<%=Replace(FP_FieldHTML(fp_rs,"ProjectDescription"),"'","\'")%>',150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script>  </td> 
<td id="full<%=counter%>" style="display:none"><script type="text/javascript">document.write('<%=Replace(FP_FieldHTML(fp_rs,"ProjectDescription"),"'","\'")%>'+" <a href='javascript:void(0)' onclick='document.getElementById(\"full<%=counter%>\").style.display=\"none\";document.getElementById(\"part<%=counter%>\").style.display=\"inline\"'>collapse. . .</a>")</script>  </td> 


What I have done is put the ASP portion in single quotes and have employeed the Replace function to deal with any single quotes that might be in your memo field.




sgreen0 -> RE: display beginning of memo field? (8/30/2005 13:35:06)

Duane!

Something very odd! The code now works, BUT, it displays in the wrong column!!!

I'm scanning the HTML to see what's up.

Here's the code again:

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>ANMT Collaborators Corner</title>
<script type="text/javascript">
function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}
</script>

</head>

<body>

<p align="center"><b><font size="6">ANMT C</font></b><font size="6"><b>ollaborators 
Corner</b></font></p>

<p align="center">
<i><b><a href="../members">Back to Members Home Page</a></b></i>
  
<p align="center" style="margin-top: 6; margin-bottom: 0">
Welcome to the ANMT Collaborators Corner!<br>
This listing will give you some information on the projects your fellow members 
are working on -<br>
and will also give you a chance to find a project to get involved with<br>
or find collaborators for your own project.<br>
Please feel free to get in touch with any of these writers<br>
if you are interested in joining or finding out more about their project<br>
(you will find their contact information on the Member Roster)<br>
<br>
Use the drop-down box below to help refine your collaborator search.

  <form method="POST" action="ANMT_Collaborators_Corner_save2.asp">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><select size="1" name="CraftChoice">
    <option <%If request.form("CraftChoice")="All Projects" then response.write "selected"%>>All Projects</option>
    <option <%If request.form("CraftChoice")="Projects Looking for Bookwriter" then response.write "selected"%>>Projects Looking for Bookwriter</option>
    <option <%If request.form("CraftChoice")="Projects Looking for Composer" then response.write "selected"%>>Projects Looking for Composer</option>
    <option <%If request.form("CraftChoice")="Projects Looking for Lyricist" then response.write "selected"%>>Projects Looking for Lyricist</option>
    </select><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
 <nobr>
<% If request.form("CraftChoice")= "All Projects" Then %>
<p align="center"><i><b><font size="4">Filtered for <%=request.form("CraftChoice")%></font></b></i></p>
<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>Project Name</b></td>
      <td><b>Project Type</b></td>
      <td><b>Project Credit</b></td>
      <td><b>Greenlight</b></td>
      <td><b>Project Description</b></td>
      <td colspan="3"><b>Collaborators Needed</b></td>
    </tr>
  </thead>
  <tbody>
<!--#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 %> 
<% 
counter = 0 
fp_sQry="SELECT Projects.ProjectID, Projects.ProjectCalendarID, Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName, Projects.Show, Projects.ARCtor, Projects.Greenlight, Projects.ProjectDescription, Projects.[Project Credit], Projects.Bookwriter, Projects.Lyricist, Projects.Composer, Projects.ProjectEndDate FROM Projects WHERE (Show = -1) AND IsNull(ProjectEndDate) ORDER BY Projects.ProjectType, Projects.ProjectGroup, Projects.ProjectName" 
fp_sDefault="ProjectID=" 
fp_sNoRecords="<tr><td colspan=8 align=left width=""100%"">No records returned.</td></tr>" 
fp_sDataConn="academy" 
fp_iMaxRecords=256 
fp_iCommandType=1 
fp_iPageSize=0 
fp_fTableFormat=True 
fp_fMenuFormat=False 
fp_sMenuChoice="" 
fp_sMenuValue="" 
fp_sColTypes="&ProjectID=3&ProjectCalendarID=3&ProjectType=202&ProjectGroup=202&ProjectName=202&Show=11&ARCtor=11&Greenlight=11&ProjectDescription=203&Project Credit=203&Bookwriter=11&Lyricist=11&Composer=11&ProjectEndDate=135&" 
fp_iDisplayCols=8 
fp_fCustomQuery=True 
BOTID=1 
fp_iRegion=BOTID 
%> 
<!--#include file="../_fpclass/fpdbrgn1.inc"--> 
<%counter = counter + 1%> 
<tr> 
<td valign="top"> 
<%=FP_FieldVal(fp_rs,"ProjectName")%>  </td> 
<td valign="top"> 
<%=FP_FieldVal(fp_rs,"ProjectType")%>  </td> 
<td valign="top"> 
<%=FP_FieldVal(fp_rs,"Project Credit")%>  </td> 
<td valign="top"> 
<% If FP_Field(fp_rs,"Greenlight") <> 0 Then 
response.write "Yes" 
End If 
If FP_Field(fp_rs,"Greenlight") = 0 Then 
response.write "No" 
End If%>  </td> 

<td valign="top"> 

<td id="part<%=counter%>" style="display:inline"><script type="text/javascript">document.write(Left('<%=Replace(FP_FieldHTML(fp_rs,"ProjectDescription"),"'","\'")%>',150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script>   </td> 
<td id="full<%=counter%>" style="display:none"><script type="text/javascript">document.write('<%=Replace(FP_FieldHTML(fp_rs,"ProjectDescription"),"'","\'")%>'+" <a href='javascript:void(0)' onclick='document.getElementById(\"full<%=counter%>\").style.display=\"none\";document.getElementById(\"part<%=counter%>\").style.display=\"inline\"'>collapse. . .</a>")</script>   </td> 

<td valign="top"> 
<% If FP_Field(fp_rs,"Bookwriter") = 0 Then 
response.write "Bookwriter Needed" 
End If %>  </td> 
<td valign="top"> 
<% If FP_Field(fp_rs,"Lyricist") = 0 Then 
response.write "Lyricist Needed" 
End If %>  </td> 
<td valign="top"> 
<%If FP_Field(fp_rs,"Composer") = 0 Then 
response.write "Composer Needed" 
End If %>  </td> 

</tr> 
<!--#include file="../_fpclass/fpdbrgn2.inc"--> 
</tbody> 
</table> 

<% End If %>



Stephen




sgreen0 -> RE: display beginning of memo field? (8/30/2005 13:39:02)

In fact, the code only works in the first instance of ProjectDescription. All the others - even those that show "more..." don't work.

Maybe both lines are being interpreted in the table - causing and extra column...

Stephen




BeTheBall -> RE: display beginning of memo field? (8/30/2005 13:56:45)

For the column issue, you have an extra td tag. try deleting this line:

<td valign="top">


As for the other, I think it is due to the contents of the memo field. The replace function dealt with the single quote issue, but there may be other characters that are causing the code to choke. Can you post the contents of the description field for "Hannah Senesh"




sgreen0 -> RE: display beginning of memo field? (8/30/2005 14:19:06)

Right again. I removed the extra <TD>.

Hannah Senesh's Project Description is empty.

It looks like the code is adding "more..." to some blank fields, but is NOT displaying text for some fields that are not empty, like "Passionwood".

Stephen

PS. I've got to run out right now. Talk to you later. Thanks. S.




BeTheBall -> RE: display beginning of memo field? (8/30/2005 15:02:45)

Alright, I seem to have it working on my end. Double quotes and line breaks are also problematic and can be the cause of your grief. Try this:

<!--#include file="../_fpclass/fpdbrgn1.inc"--> 
<%counter = counter + 1
myString = Replace(FP_Field(fp_rs,"Notes"),"'","\'")
myString = Replace(myString,chr(34),chr(92)&chr(34))
myString = Replace(myString,chr(10),"")
myString = Replace(myString,chr(13),"")
%> 
<tr> 
<td valign="top"> 
<%=FP_FieldVal(fp_rs,"ProjectName")%>  </td> 
<td valign="top"> 
<%=FP_FieldVal(fp_rs,"ProjectType")%>  </td> 
<td valign="top"> 
<%=FP_FieldVal(fp_rs,"Project Credit")%>  </td> 
<td valign="top"> 
<% If FP_Field(fp_rs,"Greenlight") <> 0 Then 
response.write "Yes" 
End If 
If FP_Field(fp_rs,"Greenlight") = 0 Then 
response.write "No" 
End If%>  </td> 

<td valign="top"> 

<td id="part<%=counter%>" style="display:inline"><script type="text/javascript">document.write(Left('<%=myString%>',150)+" <a href='javascript:void(0)' onclick='document.getElementById(\"part<%=counter%>\").style.display=\"none\";document.getElementById(\"full<%=counter%>\").style.display=\"inline\"'>more. . .</a>")</script>   </td> 
<td id="full<%=counter%>" style="display:none"><script type="text/javascript">document.write('<%=myString%>'+" <a href='javascript:void(0)' onclick='document.getElementById(\"full<%=counter%>\").style.display=\"none\";document.getElementById(\"part<%=counter%>\").style.display=\"inline\"'>collapse. . .</a>")</script>   </td> 

<td valign="top"> 
<% If FP_Field(fp_rs,"Bookwriter") = 0 Then 
response.write "Bookwriter Needed" 
End If %>  </td> 
<td valign="top"> 
<% If FP_Field(fp_rs,"Lyricist") = 0 Then 
response.write "Lyricist Needed" 
End If %>  </td> 
<td valign="top"> 
<%If FP_Field(fp_rs,"Composer") = 0 Then 
response.write "Composer Needed" 
End If %>  </td> 

</tr> 
<!--#include file="../_fpclass/fpdbrgn2.inc"--> 


Note: I just pasted from <!--#include file="../_fpclass/fpdbrgn1.inc"--> to ]<!--#include file="../_fpclass/fpdbrgn2.inc"-->. Nothing else was changed.




sgreen0 -> RE: display beginning of memo field? (8/30/2005 20:01:14)

Thanks, Duane.

It works, now. I did add an IF clause to simply show the field contents it the filed is less that 150 characters long. That way smaller and empty fields don't display the "more..." link without any text.

Thanks for sticking to it.

Now do you know how to force the column width to remain the same? Everything I tried doesn't work. Showing "more" also expands the width of the cell...

Take care.

Stephen




BeTheBall -> RE: display beginning of memo field? (8/30/2005 23:00:22)

Stopping table cells from resizing is near impossible, at least in my experience. Maybe you could use a mouseover script to show the full description, instead of the expanding/contracting method. Something like this:

http://www.thatswhatido.net/Truncate_Memo_with_Javascript.asp




Page: [1] 2   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.140625