This topic is locked

Change display of 'More...' text

4/23/2007 10:46:52 AM
ASPRunnerPro General questions
K
kbdci author

When I click the More... in a field, I would like to display the text in a different font and size than the default in the popup window. How can I set that?
I would also like to make the display window larger. How?
I would also like to change the display of the More... text to --More--. Can I do that?
Thanks.
Kathy <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=5072&image=1&table=forumtopics' class='bbc_emoticon' alt=':rolleyes:' />

J
Jane 4/24/2007

Kathy,
to change More link open include/commonfunctions.asp file, find ProcessLargeText function, locate and modify following code snippet:

...

ret = ret & " <a href=""#"" onClick=""java script: pwin = window.open('',null,'height=300,width=400,status=yes,resizable=yes,toolbar=no,menubar=no,location

=no,left=150,top=200,scrollbars=yes');
"

...

ret=ret & "return false;"">" & "More" & " ...</a>"

Elseif cNumberOfChars > 0 And Len(strValue) > cNumberOfChars And mode = MODE_LIST Then

...

ret = ret & " <a href=# onClick=""java script: pwin = window.open('',null,'height=300,width=400,status=yes,resizable=yes,toolbar=no,menubar=no,location

=no,left=150,top=200,scrollbars=yes');
"

ret=ret & " pwin.location='" & table & "_fulltext.asp?" & iquery & "'; return false;"">" & "More" & " ...</a>"

...

K
kbdci author 4/24/2007

Thanks so much for the information. I had tried searching for several things but couldn't find this code. By the way, in my version of ASPRunner Pro (4.0 build 96), the code is in include/aspfunctions.asp.
I was able to change the size of the window and the "More" text easily, but I still can't figure out how to change the font and size of the text that is displayed in the "More" window. Can anyone help?
Kathy

J
Jane 4/25/2007

Kathy,
if you use ASPRunner 4.0 you need to modify include/aspfunctions.asp file. See my changes in Bold:

if Len(ProcessLargeText)>cNumberOfChars and left(strValue,7)<>"<a href" then

ProcessLargeText = Left(ProcessLargeText, cNumberOfChars ) & _

" <a href=""#"" onClick=""java script: pwin = window.open('',null,'height=300,width=400,status=yes,resizable=yes,toolbar=no,menubar=no,location

=no,left=150,top=200,scrollbars=yes'); "

ind = 1

ProcessLargeText = ProcessLargeText & "pwin.document.write('<font color=red>" & HTMLEncode(Replace(Replace(Replace(Mid(strValue,ind, ind+800),"'","\'"), vbcrlf, "
"), vblf, "
")) & "</font>');" & vbcrlf

ProcessLargeText = ProcessLargeText & "pwin.document.write('
<hr size=1 noshade><a href=# onClick=\'window.close();return false;\'>" & ##SCRIPTMESSAGE(CLOSE_WINDOW)## & "</a>');"

ProcessLargeText = ProcessLargeText & "return false;"">" & ##SCRIPTMESSAGE(MORE)## & " ...</a>"
end if

K
kbdci author 4/25/2007

Thanks again. That works fine unless I have any HTML in the field to be displayed in the LargeText window. I have found that if I set the field as HTML in the "View as" column on the formatting screen, the "More" function is not available. If I don't set the field to HTML, I can then use HTML codes in the text as long as I don't include any in the text that appears on the View screen.
If I use the <font> settings you suggest, any LargeText field that contains HTML text appears in the default font style while fields that don't contain HTML code display as set in the aspfunctions.asp code as you suggest.
Is there any way around this? Can I set the field as HTML and still use "More"?
Kathy <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=17291&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />

Sergey Kornilov admin 4/25/2007

Kathy,
you cannot use "More ..." feature with HTML.
"More" truncates field content at certain position. If you truncate it at the wrong place (inside HTML tag) the whole page formatting will be broken.
We plan to find some workaround in later version.