All posts in: How To

Get domain out of any URL string

It’s a common problem with no single right answer: extract the top domain (e.g. example.com) from a given string, which may or may not be a valid URL. I had need of such functionality recently and found answers around the web lacking. So if ...

banner
banner

Open a new popup window using javascript

To open a new window using javascript can use the following function. You just have to do is send the link and the window name. function popup(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == ...

Retrive time period like facebook

In facebook stream you’ll see the time period at the bottom of the stream. For example: 4 minutes ago, 2 days ago, 3 weeks ago…. In our recent project we have to show similar time fashion for our application’s activity stream. So I write a ...

Parse URL’s in text, create links

I’ve discovered a huge drawback to the Twitter messaging system: it does not store links. The Twitter site itself will identify URL’s in messages and convert them into clickable links for you automatically. But the magic ends at Twitter’s ...

Page 2 of 41234

Get Adobe Flash player