I need to do a search based on a term entered into a text box. Simply: user clicks something and results are returned.
This is fairly straight-forward, except I'm having a bit of difficulty actually implementing it. The problem is, I want to do this as RESTfully as possible, so I don't want to create a button as follows:
<input id="searchButton" type="button" value="Search" />
because this will POST the data to the server, and I don't want to do a POST because I'm not changing the state of anything. I'm retreiving data based on the value in the search box
I'd like to have it as a simple link, such as:
<a href="/Controller/Action">Search</a>
but it has to be styled as a button. If I was using the input, I could have CSS similar to:
.standardButtonStyle {
background:url("../images/search_button.png") no-repeat scroll 0 0 transparent;
border:0 none;
color:White;
cursor:pointer;
}
but I don't think I can apply this to the anchor tag. Can somebody tell me the right way to do this?