VS: VS: VS: Newbie: get hyperlink working?
Jan Schenkel
janschenkel at yahoo.com
Tue Sep 10 06:42:00 EDT 2002
--- Esa_Kivelä <Esa.Kivela at ncrc.fi> wrote:
>
> [snip]
>
> Nope: hmm here is exaple:
>
> lets assume that in the text field some typed like
> "hey chek this link www.ncrc.fi for more
> information" and press SAve button then in the save
> button its puts hole text wield into html-dokument
> BUT now its hole thing appear as text also that
> hyperlink.
>
> What I try to do that same text appear in the html
> dokument as text but that www.ncrc.fi or what ever
> usres typed as link among the tehxt works like link
> in html-document when save button is pressed.
>
Ah, now I see what you were going for -- it's not
meant for displaying in RunRev.
Unfortunately, that's not as easy to accomplish :
you'll have to parse the content of the field and try
and determine what is a link and what is not.
The problem there is that people may not always
'format' the link in an easily recognisable way.
A few tricky examples:
1) suppose we want to support including an email
address: someone at example.net must become a link,
including the 'mailto:' bit.
If you just check if there's an '@' sign in the word,
what will happen if you encounter a line
me:secret at ftp.example.net
which would actually denote an ftp-url.
2) some users will copy&paste a URL from their browser
and it will already contain an 'http://' keyword.
Others will just type "check www.example.net"
Have fun prepending the keywords.
Even though you _can_ overcome all these problems, a
far simpler, alternative method is to provide a
separate field "link" and then insert that into the
html code. It will save you a lot of headaches...
Best regards,
Jan Schenkel.
"As we grow older, we grow both wiser and more foolish
at the same time." (De Rochefoucald)
__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute
More information about the use-livecode
mailing list