Thread: jquery help
View Single Post
Old 09-22-2009, 08:42 AM  
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
I doubt this is exactly what you're looking for, but:

Code:
$("form").submit(function() {
      location.href='/search/' + encodeURIComponent(this.s.value).replace(/%20/g, '+')+ '.html';
      return false;
});
This will tie this function to execute on a submit for the form, ala onSubmit.
__________________
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote