jQuery - string disapearing from a variable -


Hey, I'm doing a search box and when I want to redirect the page, there is some weird hepense.

Here's the script:

  $ ('# search_form'). Submit (function (ev) {var searchTerm = $ ("input [name = search_term]") .val (); var search_location = conf_full site address + "search /" + search surf + "/"; warning (search_space) ; Window; location; location (search_space);});  

Now the user I want to be redirected.

It is also what I get through alert (); Function, but I'm redirected and it ignores the search completely and it's in the string, because it gets cautious!

Does anyone know what is happening?

Thank you, Mike. / P>

  $ ('# search_form'). Submit (ev) {ev.preventDefault () / * Add this * / var searchTerm = $ ("input [name = search_term]"). Val (); var search_space = conf_full site address + "search /" + Search surf + "/"; Window = location = window.location (Search_location); / * and mod * *};  

Comments