Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2019-06-06 02:53 PM
How to disable Save and Save and Close buttons by using the Custom Code?
2019-06-06 05:15 PM
Faisal,
For example:
<script>
Sys.Application.add_load(function() {
$('#master_btnSave').hide();
$('#master_btnApply').hide();
});
</script>
2019-06-07 10:16 AM
Thank you Ilya Khen, the thing is this that i just want to disable the Dave button like when it is disabled During the View Mode is there any way to do that.
2019-06-07 10:28 AM
Yes, in 6.6 I would do:
<script>
Sys.Application.add_load(function() {
$('#master_btnSave div').addClass( "tb-btn-disabled" );
$('#master_btnApply div').addClass( "tb-btn-disabled" );
$('#master_btnSave').unbind('click').prop("onclick", null);
$('#master_btnApply').unbind('click').prop("onclick", null);
});
</script>
That probably would work in 6.5 too, just so that I have currently 6.6 as a Test env.
2019-06-07 10:53 AM
As an alternate code, try the below. I have used it in 6.4 SP1..
But I would definitely go with Ilya's code, seems more reliable.
<script type="text/javascript">
Sys.Application.add_load(function() {
$('#master_btnSave').attr('href',"#").removeAttr('onclick');
$('#master_btnSave > div > div > img').removeAttr('onclick');
$('#master_btnApply').attr('href',"#").removeAttr('onclick');
$('#master_btnApply > div > div > img').removeAttr('onclick');
});
</script>
2019-06-07 11:03 AM
Thank again, we are having 6.5 and it is making the buttons in grey color but still clickable save action is happening
2019-06-07 11:04 AM
Thanks Arun but unfortunately it is not working may be due the fact that we are having 6.5 p3
2019-06-07 11:05 AM
Really? You probably have used older code. Check the post again.
2019-06-07 11:13 AM
No, I have used:
<script>
Sys.Application.add_load(function() {
$('#master_btnSave div').addClass( "tb-btn-disabled" );
$('#master_btnApply div').addClass( "tb-btn-disabled" );
});
</script>
It is making it visibly inactive but if you click on it.. save functionality is there
2019-06-07 11:15 AM
Like mentioned:
<script>
Sys.Application.add_load(function() {
$('#master_btnSave div').addClass( "tb-btn-disabled" );
$('#master_btnApply div').addClass( "tb-btn-disabled" );
$('#master_btnSave').unbind('click').prop("onclick", null);
$('#master_btnApply').unbind('click').prop("onclick", null);
});
</script>