The noscript element represents nothing if scripting is enabled, and represents its children if scripting is disabled. It is used to present different markup to user agents that support scripting and those that don’t support scripting, by affecting how the document is parsed. <script type=”text/javascript”> //If javascript enabled then this part will work. //Your javascript code here… </script> <noscript>JavaScript disabled on your […]
Tag: disable
How to disable ASP.Net button after click to prevent double clicking
Let’s say you have 2 buttons on your web page. <form id=”form1″ runat=”server”> <asp:Button ID=”Button1″ runat=”server” Text=”Button1″ OnClick=”Button1_Clicked” /> <asp:Button ID=”Button2″ runat=”server” Text=”Button2″ /> </form> Scenario 1: Disabling the specific button <script type=”text/javascript”> function DisableButton() { document.getElementById(“<%=Button1.ClientID %>”).disabled = true; } window.onbeforeunload = DisableButton; </script> The DisableButton JavaScript function is used for disabling specific Button when Clicked. […]
How to disable mouse actions for a specific div with CSS
Let’s say you have a div with id “myDiv” <div id=”myDiv”> <input type=”text” value=”value” /> <br /> <textarea>value</textarea> </div> If you want to disable all the mouse actions in that div only then you can use this in your CSS file: #myDiv { pointer-events: none; }
How to make a checkbox or dropdown readonly in Razor
You can add @disabled = “disabled” to the last parameter named HtmlAttributes. @Html.CheckBox(“someNameForYourCheckBox”, CheckedValue (True or Not), new { @disabled = “disabled” }) @Html.DropDownList(“someNameForYourDropDown”, YourSelectList (comes from Model), new { @disabled = “disabled” })
How to enable, disable and check if Service Broker is enabled on a database in SQL Server
To enable Service Broker run: ALTER DATABASE [Database_name] SET ENABLE_BROKER; To disable Service Broker: ALTER DATABASE [Database_name] SET DISABLE_BROKER; To check if Service Broker is enabled on a SQL Server database: SELECT is_broker_enabled FROM sys.databases WHERE name = ‘Database_name’; If the result is ‘1’, the Service Broker is enabled. Thanks to zarez.net for this useful […]
Disable REST API Plugin
Disable the REST API with a Plugin: If you want to try a completely different solution you can try out https://wordpress.org/plugins/disable-json-api/ which takes care of removing the REST API functionlity for you. Disable the REST API without a Plugin: Maybe you don’t use any security plugins. While I recommend that you reconsider and install either WordFence or […]