c# - How to call different JQuery functions from a dropdownlist? -
How do you tie each item in a dropdown list to a different JQuery function?
For example, I have a dropdown with different report names, I want to select drop down to trigger a new report to display every time.
I already sent it to I want to call the same function above each separate report item in the dropdown list. 5 Or I will need to call either. Is there a way to embed a link, am I using "Change" in some way on "Click"? I am using Razor and MVC .Net I can do something like As you are trying to bind with the From there, you will decide that the value of the current value Has decided which option at the cutting edge (probably went to get) and if statements or using a series of any other method to an action based on that value. & lt; A href = "#" Id = "btnReport1"> Report 1 which is called
$ ("# btnReport1"). Bind ("click", Function () {...}
@ html. Dropdown list (...) with a selectList object and code is inserted in the controller file if needed. But I prefer to handle HTML though .
select dropdown, this is the best way to accomplish this.
On Change () Handler (for details).
Comments
Post a Comment