What is the expression I should use in order to check for a valid url in javascript?
Take a look at this complete regular expression for URLs that has been generated automatically based on the RFC 1738.