Hi I am using the following function for limiting the amount of data that is shown in a table column with repeating region
And I am using it on the following field
However what i would like to do is if the text is longer than the specified amount, in this case it is 20 characters I would like a way to show the users the full text.
I have actually done the following
which when the user clicks on the comments field it takes them to another page where they can see all of the text.
What I would really like to do is say if the field length is greater than 20 then show the link otherwise there is no link.
Can anyone suggest a way to accomplish this please
Regards
Paul
Code:
<%
Function FieldCut (FCfield,FClength,FCtrimtype,FCtext)
if FCfield <> "" then
if FCtrimtype = True then
if LEN(FCfield) < FClength then
FCfield = RIGHT(FCfield, FClength)
Else
FCfield = RIGHT(FCfield, FClength) & FCtext
End if
Else
if LEN(FCfield) < FClength then
FCfield = LEFT(FCfield, FClength)
Else
FCfield = LEFT(FCfield, FClength) & FCtext
End if
End if
Response.Write(FCfield)
End if
End Function
'***EndFieldCut- control output
%>
And I am using it on the following field
Code:
<%=FieldCut((rsOldStock.Fields.Item("Comments").Value),20,false,"")%>
However what i would like to do is if the text is longer than the specified amount, in this case it is 20 characters I would like a way to show the users the full text.
I have actually done the following
Code:
<td class="TextNormalRight">
<A HREF="RepsComments.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "PlantID="&(rsOldStock.Fields.Item("PlantID").Value)& "&Spec_No="&(rsOldStock.Fields.Item("Spec_No").Value) %>"><%=FieldCut((rsOldStock.Fields.Item("Comments").Value),20,false,"")%></A></td>
What I would really like to do is say if the field length is greater than 20 then show the link otherwise there is no link.
Can anyone suggest a way to accomplish this please
Regards
Paul