i am working on submitting a form and passing lastname and firstname and redirect search to http://data. but when i click enter or click submit button it does not redirect to http://data and it just reload the correct page
The current code is place under script editor webpart
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="http://jquerysharepointform.googlecode.com/files/jquery.SharePointFormSubmit.js">
<script>
function($){
$.fn.SharePointFormSubmit = function(element,method,action) {
var e; // new input element
var f = document.createElement("form"); // form
f.method = method;
f.action = action;
f.setAttribute("style","display:none");
$(element).find("input, select, textarea").each(function(){
e = document.createElement("input")
e.setAttribute("type", $(this).attr("type"));
e.setAttribute("id", $(this).attr("id"));
e.setAttribute("name", $(this).attr("name"));
e.setAttribute("value", $(this).val());
e.setAttribute("checked", $(this).attr("checked"));
e.setAttribute("multiple", $(this).attr("multiple"));
f.appendChild(e);
});
var s = document.body.appendChild(f);
s.submit();
};
})(jQuery);
</script>
<div id="divIdForm">
<h2>People & Places Search</h2>
<input type="text" name="firstName id="firstName" value="" size="21" maxlength="50" />
<input type="text" name="lastName" id="lastName" value="" size="22" maxlength="50" />
<input type="submit" value="" class="search" onclick="jQuery().SharePointFormSubmit('#divIdForm', 'post','http://data/default.aspx')">
</div>