I have a textbox and I need a script to detect when a user types a link using space as a delimiter. I know how to detect links with regex, but I don’t know how to effectively check for links (think of Facebook’s status updates; type a link, hit space, and it looks that link up). Anyone have any ideas?
Thanks.
If you are using jQuery its done like this:
$('#someElement').keyUp(function(event){ if(event.keyCode == 32){ //Regex goes here } })