jquery help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fris
    Too lazy to set a custom title
    • Aug 2002
    • 55679

    #1

    jquery help

    anyone know what the equivalent in jquery would be?

    onsubmit="location.href='/search/' + encodeURIComponent(this.s.value).replace(/%20/g, '+')+ '.html'; return false;"
    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.
  • GrouchyAdmin
    Now choke yourself!
    • Apr 2006
    • 12085

    #2
    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.

    Comment

    • nation-x
      Confirmed User
      • Mar 2004
      • 5370

      #3
      I prefer to use the form plugin because it gives you alot more control over the form in general.
      http://malsup.com/jquery/form/

      Comment

      • fris
        Too lazy to set a custom title
        • Aug 2002
        • 55679

        #4
        ya i saw that plugin, wasnt sure how to incorporate it into what im trying to do
        Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

        Comment

        Working...