Forum Moderators: open

Message Too Old, No Replies

Auto-sense URLs on page

         

xgothmogx

10:09 pm on Sep 20, 2008 (gmt 0)

10+ Year Member



Is there a script/code snippet that allows URLs typed in as text to be auto tagged with an href and targetted to open in a blank window?
For example, in many forums (like here) when you type in [blahblahblah.com...] it is automatically converted into a working link. I'd like to find out how that's accomplished. I've searched around (maybe not hard enough?) but can't seem to find something about it.
Thanks in advance!

lavazza

10:48 pm on Sep 20, 2008 (gmt 0)

10+ Year Member



Is there a script/code snippet that allows URLs typed in as text to be auto tagged with an href

[webmasterworld.com...]

how to convert URLs into links? how can I do to convert url's which are in a string into their links? [webmasterworld.com]


and targetted to open in a blank window?

Please, don't do that! At least, not without warning the user

[w3.org...]

Example for Checkpoint
10.1 - Until user agents allow users to turn off spawned windows, do not cause pop-ups or other windows to appear and do not change the current window without informing the user.

xgothmogx

11:11 pm on Sep 20, 2008 (gmt 0)

10+ Year Member



Thanks. Is there no way to do this in an html page? It looks like this is just in php or perl.

lavazza

11:48 pm on Sep 20, 2008 (gmt 0)

10+ Year Member



Is there no way to do this in an html page?
No, not in plain html, which is (and should be) simply a mark-up language

For 'behaviour', incorporate scripts (client-side and/or server side) into the html :)