PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: Warning()[Next]: WriteLineToTmpImportFile()
\ -> Rexx -> Inbuilt PPWIZARD Functions -> 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:

  1. String
    This is the string we are adjusting.

  2. Break At Char List
    This is a list of chars, it is OK to break the line after any of these characters ("/\?&_" by default).

  3. Break With String
    This specifies the string used to mark the conditional break ("<wbr>" by default).

  4. Minimum Size
    If you wish that there be a minimum gap between insertions of the break code then you can use this parameter to set the value. This value is "0" by default, which means that the code is inserted after every occurance of one of the above characters.

  5. Maximum Size
    If you wish that there be a maximum gap between insertions of the break code then you can use this parameter to set the value. This value is "very large" by default (has no effect).

The resultant string is returned.


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 ----------------------------------
    <TH ALIGN=CENTER>http://</TH>
    <TH ALIGN=CENTER>Information</B></TH>

    <TD ALIGN=CENTER><$LinkToDisplayedURL URL="www.geocities.com/SiliconValley/Heights/6121/"></TD>
    <TD ALIGN=CENTER>Programmer's Info Page.</TD>

email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: Warning()[Next]: WriteLineToTmpImportFile()

My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Saturday May 28 2022 at 2:55pm