[jQuery] Re: Form validation - Add "http://" to text field if user forgot it

2009-06-03 Thread iroy...@googlemail.com
make sure to adjust the name attribute to your markup. On 3 Jun., 11:49, P wrote: > Thanks for your reply but unfortenately this doesnt work... > > On 28 Maj, 14:59, Jörn Zaefferer > wrote: > > > Try this: > > > $("input[name^=link]").blur(function() { > >   if (!/^http:\/\//.test(this.value) {

[jQuery] Re: Form validation - Add "http://" to text field if user forgot it

2009-06-03 Thread P
Thanks for your reply but unfortenately this doesnt work... On 28 Maj, 14:59, Jörn Zaefferer wrote: > Try this: > > $("input[name^=link]").blur(function() { >   if (!/^http:\/\//.test(this.value) { >     this.value = "http://"; + this.value; >   } > > }); > > Jörn > > > > On Thu, May 28, 2009 at

[jQuery] Re: Form validation - Add "http://" to text field if user forgot it

2009-05-28 Thread Jörn Zaefferer
Try this: $("input[name^=link]").blur(function() { if (!/^http:\/\//.test(this.value) { this.value = "http://"; + this.value; } }); Jörn On Thu, May 28, 2009 at 2:19 PM, P wrote: > > In my form I have a couple of text fields into which the user enters > links. > > > > > > Now I want