PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
Wbr() |
This is an inbuilt function function provided by PPWIZARD.
When some items such as directory names or URLs are displayed (particularily as one column in a multicolumn table) the length of these items can cause major display headaches.
The intention of this routine is to add "<wbr>" tags at spots where we wouldn't mind the item being split if required.
It should be noted that "<wbr>" is not that well supported, but it seems the latest IE and Netscape do. Where there is no support the worst case situation should be the text is not split and it is all on one line (back to the original problem).
The function takes the following parameters:
The resultant string is returned.
EXAMPLE |
This example shows a table where the first column contains a URL as a hypertext link to the URL shown. We don't wish the column to be wider than 18 characters (longer URLs will span multiple lines).
;--- Define a macro to (1) Create link (2) split up long URLS --- #define LinkToDisplayedURL \ #evaluate "TmpResult" "wbr('{$URL}')" \ <A TARGET=_top HREF="http://{$URL}"> \ <$TmpResult></A> \ #undef TmpResult ;--- Example of use in a table ---------------------------------- <BR><CENTER><TABLE COLS=2 BORDER=5 CELLSPACING=5> ;------------------------------------------------------------ <TR> <TH ALIGN=CENTER>http://</TH> <TH ALIGN=CENTER>Information</B></TH> </TR> ;------------------------------------------------------------ <TR> <TD ALIGN=CENTER><$LinkToDisplayedURL URL="www.geocities.com/SiliconValley/Heights/6121/"></TD> <TD ALIGN=CENTER>Programmer's Info Page.</TD> </TR> </TABLE></CENTER>