GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   jquery help (https://gfy.com/showthread.php?t=929234)

fris 09-22-2009 08:27 AM

jquery help
 
anyone know what the equivalent in jquery would be?

Quote:

onsubmit="location.href='/search/' + encodeURIComponent(this.s.value).replace(/%20/g, '+')+ '.html'; return false;"

GrouchyAdmin 09-22-2009 08:42 AM

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.

nation-x 09-22-2009 09:05 AM

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

fris 09-22-2009 09:10 AM

ya i saw that plugin, wasnt sure how to incorporate it into what im trying to do


All times are GMT -7. The time now is 02:33 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123