Par2: Autospot Hyperlinks without displaying the URL
1998-08-03 -- Jim DeFabia
Internet Connect's Autospot Hyperlinks feature displays something like
http://mydomain.com/mypage.htm. To display some text instead of the URL, there
is a feature of the Clarion Java Applet that will allow you to do this.
The Java string control and the Java list controls have built-in capabilities to do
exactly
that determine the display based on the data it is called upon to display. If the data
contains a string that is formatted in a special manner, it displays some text and links
to
a URL.
To work in this manner, the data must contain a valid URL followed by the display text.
The text to be display must be enclosed in angle brackets (< >). For example
http://www.topspeed.com
will display "Visit the TopSpeed Web Site" while a click on the control will send the
user to www.topspeed.com.
You can use this feature in a number of ways. Of course, you can have a data field
which contains data formatted exactly as you want it, but that requires users to know
how to enter the data. A better way is to use two fields -- one for the URL and the
other for the display text. Then concatenate a string for the Java String control to use.
For example:
LOC:URLLink = FIL:URL & '<<' & CLIP(FIL:URLDisplayText) & '>'
Notice that the left angle bracket (<) is duplicated. This is required to handle this
special
character.
You can also use this technique for a filed displayed in a BrowseBox control. Just
populate the local variable and create a formula similar to the one above to assign its
value. One caveat: The opening angle bracket must adjoin the URL; there can be no
spaces in between.
Printed November 21, 2024, 12:50 pm
This article has been viewed/printed 35194 times.