$("#selectsearch").change(function() {
var action = $(this).val() == "people" ? "user" : "content";
$("#search-form").attr("action", "/search/" + action);
});
More Related Contents:
- Replace 0 in form field with empty by jQuery
- Prevent users from submitting a form by hitting Enter
- Resetting a multi-stage form with jQuery
- Using JQuery – preventing form from submitting
- jQuery .val() vs .attr(“value”)
- Get checkbox value in jQuery
- val() vs. text() for textarea
- How to limit the number of selected checkboxes?
- Submit form with Enter key without submit button? [duplicate]
- How to add additional fields to form before submit?
- Prevent redirect after form is submitted
- How to change an element’s title attribute using jQuery
- calculate the number of html checkbox checked using jquery
- Is there a way to clone form field values in jQuery or javascript?
- Jquery toggle event is messing with checkbox value
- How to reset radiobuttons in jQuery so that none is checked
- How to make Chrome remember password for an AJAX form?
- Disable scrolling when changing focus form elements ipad web app
- Ajax Form submit with preventDefault
- HTML5 validation before ajax submit
- JQM (jQueryMobile) Dynamically added elements not displaying correctly and CSS is not applied
- Create Dynamic div with unique IDs – jQuery
- MS MVC form AJAXifying techniques [closed]
- jQuery html attribute not working in IE
- Force a checkbox to always submit, even when unchecked
- submitting multiple forms with AJAX
- Jquery how to bind click event on dynamically created elements?
- jQuery detect click on disabled submit button
- Weird behaviour of iframe `name` attribute set by jQuery in IE
- How do I select the parent form based on which submit button is clicked?