remove double http:// from input via jquery

Posted by loo on Stack Overflow See other posts from Stack Overflow or by loo
Published on 2010-06-14T15:09:20Z Indexed on 2010/06/14 15:12 UTC
Read the original article Hit count: 254

Filed under:
|
|

I have a textarea with a default value of http://. Now when an user pastes in an url (if they don't know what they are doing, like most people) it comes out like this http://http://www.google.com. I've seen a site that as soon as you have http://http:// it removes one via Ajax.

I am not familiar with Ajax, so can anyone help me?

I don't want to clear the field on focus only.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX