Jquery Focus event

Sep 15 2014 6:06 AM
<td class="textformcol">
@Html.TextBox("CategoryName", null, new { data_autocomplete_url = Url.Action("AutoComplete_Buyer"), @class = "textboxwdh200", id = "CategoryNameBuyer", maxlength = "30", onkeypress = "return isCharNumeric(this,event);" })
</td>
<td class="textform">
<input type="image" src="../../App_Themes/Themes/Images/button_submit.gif" id="BuyerSubmit" name="BuyerSubmit" />
</td>
 
I am new to Jquery..can anyone help me to write code for when search button is clicked the focus should be at results occured..
i have written below one..
 
$(document).ready(function () {
$("#BuyerSubmit").click(function () {
debugger;
var Category = $('#CategoryNameBuyer').val();
url = 'business-buyer-leads?CategoryName=' + Category;
window.location = url;
$('#CategoryNameBuyer').focus();
});
});
 
But i am not getting the needed output..thanks in advance. 

Answers (4)