javascript - Issues disabling a button on IE -


i'm having issue disabling button on ie.

the issue should simple fix... want button disabled while function running reason on ie button never disabled... i've tried 2 approached both of them work on chrome , ff can't work on ie...

document.getelementbyid('printimage').setattribute('disabled', true);  document.getelementbyid('printimage').disabled = true; 

additionally if go on developer tools on ie , manually set disabled attribute work have no idea what's going on.

update

ok issue wasn't on setting attribute.... issue this: first disable button, open new window using window.open, after random stuff , window.focus window.print() , lastly window.close() after re enable button reason ie enables on if new opened window still open... works fine in chrome waits new window close before enabling button again

thanks can provide!

the proper value disabled attribute disabled. try:

document.getelementbyid('printimage').setattribute('disabled', 'disabled'); 

undo with:

document.getelementbyid('printimage').removeattribute('disabled'); 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -