Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Disable button in IE11

$
0
0

I am writing a REACT component and I am trying to disable the button below, I can

$('#publish').prop('disabled', true);

this works perfectly in chrome and ff, by graying out the button and stopping the onclick event, but it only grays out in IE11 and does not stop execution if clicked on. I have tried loads of different this, like using document.getElementById('publish).disabled = true; etc, but nothing stops it working.

Anyone any ideas?  

<button id="publish" type="submit" className="btn btn--publish" onClick={this.handlePublish}>
Publish
</button>


Viewing all articles
Browse latest Browse all 3527

Trending Articles