Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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..Actually at the top of the page there is some description about the sit is there.
i have written below one..

HTML
<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>

JavaScript
<script language="javascript">
$(document).ready(function () {
$("#BuyerSubmit").click(function () {
debugger;
var Category = $('#CategoryNameBuyer').val();
url = 'business-buyer-leads?CategoryName=' + Category;
window.location = url;
$('#CategoryNameBuyer').focus();
});
});
</script>

But i am not getting the needed output..thanks in advance.
Posted
Updated 18-Sep-14 20:11pm
v4

1 solution

Please have a look Here[^]

Are you using any master page? And you may need to get the clienID for that.
Please read here[^]
 
Share this answer
 
Comments
Member 11012889 19-Sep-14 2:20am    
No its not a msater page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900