javascript - How to disable div tag in asp button click -
Click on the button div tag is disabled but after page load is re-enabled. How to stay locked after clicking on the button after page load
& lt; Script language = "javascript" type = "text / javascript" & gt; Function togglidable () {$ (document) .ready (function () {document.getElementById ('flip'). Style.display = "none"; document.getElementById ('flip1'). Style.display = "none ";}); } & Lt; / Script & gt;
You changed the display in the customer code but VisualState control is not updated You can keep hidden state in hidden field and hidden field to show any server side div Can also remove the document to show or hide it. Toggledisable ()
HTML & lt; Input type = "hidden" runat = "server" id = "hdnflip" /> & Lt; Input type = "hidden" runat = "server" id = "hdnflip1" /> JavaScript function togglidable () {document.getElementById ('& lt;% = flip.ClientID% & Gt; ') .style.display = "none"; document.getElementById ('& lt;% = flip1.ClientID% & gt;'). Style.display = "none"; document.getElementById ('& lt;% = hdnflip.ClientID% & gt;'). Value = "true"; Document.getElementById ('& lt;% = hdnflip1.ClientID% & gt;'). Value = "true"; } Behind the code flip. View = bool.Parse (hdnflip.Value) flip1.Visible = bool.Parse (hdnflip1.Value)
Comments
Post a Comment