This seems like it should be quite easy, but I'm not sure why it isn't working. I have a button I create in Razor like so:
@Html.ActionLink("Next", "Add-Remove", "Catalogue-Item-Authors", new { id = Model.CatalogueItemID }, new { @class = "btn btn-default", @id = "next-button", @disabled="disabled" })
I want it to be disabled as first, but when my submit button is clicked, it should be enabled. I have a form and in the OnSuccess parameter of the form I call EnableNext(). Here is the function:
function EnableNext() {
document.getElementByID('next-button').disabled = false;
}
It gets called at the right time, I verified that by placing alert("test") in the funciton, but the button is never enabled. Can anyone see why my button wouldn't be getting enabled?? Thanks.
idattribute generated for your button, it really next-button? also for enabling you can remove attributedisable