- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 05:43 AM
i have this button:
<g:dialog_buttons_ok_cancel ok_id="submitdata" ok="return go_ok()" ok_type="button" ok_text="Run" ok_style_class="btn btn-primary" cancel_type="button" cancel_id="canceldata" cancel_style_class ="btn btn-default" cancel="return goCancel()"/>
and i am looking for a way to disable it and also a way to enable it later by using document.getElementById.
can someone tell me how to do those two things?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 05:48 AM
You can use:-
-
document.getElementById("Button").disabled = true; -
document.getElementById("Button").disabled = false;
Hope this helps. Please mark the answer as correct/helpful based on impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 05:46 AM
Hi
please look into the underlying Heisenberg style guide. You only have to add/remove the respective CSS classes
https://hi.service-now.com/styles/heisenberg/styleguide/docs/components_-_buttons.html
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2022 05:48 AM
You can use:-
-
document.getElementById("Button").disabled = true; -
document.getElementById("Button").disabled = false;
Hope this helps. Please mark the answer as correct/helpful based on impact.
