Using jQuery, how can I add a default value of http:// into an input field that can’t be removed, but that still allows you to type a URL after it?
http://
Defa
UPDATE: Guillaumesm's answer to Ecmascript 5:
Form.prototype.set_HttpPrefix = function (e) { if (e.data.$url.val().length < 7) { e.data.$url.val('http://') } else if (e.data.$url.val().indexOf('http://') !== 0) { e.data.$url.val('http://' + String.fromCharCode(e.which)) } }