Shanu Garg
Shanu Garg

Reputation: 31

how to click action link menu option in JavaScript

I have a action link which is given below

<ul>
<li>@Html.ActionLink("Manage Suppliers New", "SupplierPartialViewNew", "Supplier", null, new { @class = "navLinks", id = "ManageSuppliersNew" })</li>
</ul>

How do I click on above menu option in JavaScript. I am trying to click it forcefully (click in JavaScript when page load)

I am trying this but It is not working. May I am doing some mistake

<script type="text/javascript">
        //debugger;
        alert("You reached here");
        $('#ManageSuppliersNew').click(function () { /* bla */ });
    </script> 

Upvotes: 0

Views: 83

Answers (0)

Related Questions