Ok here is my problem. I have posting of jobs. And all the jobs have a couple of paragraphs of description on them. Now I want to show just a few sentences of each description and then have a colapse/expand "read more" type of thing. Now I've got it working with my code and JavaScript, however it breaks in FireFox if there is HTML in the descriptor. If there is a <ul><li> elment it will read that and expand the box. Here is the code I use:
<cfset tmp = Find(" ",JobDescription,100)-1>
<cfif tmp lte 0>
#ParagraphFormat(JobDescription)#
<cfelse>
#Left(JobDescription,tmp)#
<span id="#JobID#" style="display:none;">
#Mid(JobDescription,tmp+1,Len(JobDescription))#
</span>
<span class="linkMore"><A HREF="javascript:showHideDescriptions('#JobID#')">more +/-</a></span>
</cfif>
Has anyone tried to do something similar before? any tips on how to go about this? Thanks!
<cfset tmp = Find(" ",JobDescription,100)-1>
<cfif tmp lte 0>
#ParagraphFormat(JobDescription)#
<cfelse>
#Left(JobDescription,tmp)#
<span id="#JobID#" style="display:none;">
#Mid(JobDescription,tmp+1,Len(JobDescription))#
</span>
<span class="linkMore"><A HREF="javascript:showHideDescriptions('#JobID#')">more +/-</a></span>
</cfif>
Has anyone tried to do something similar before? any tips on how to go about this? Thanks!