How to make the javascript style visible
I have a javascript function that basically hides or displays fields according to a filter. and I need to write javascript for those controls for validation. I'm doing this by trying to execute a series of style.visible="visible" & "hidden" statements. Is it possible to generate dynamically a html file which will contain only <div> tags of which contents are hidden from user.
Re: How to make the javascript style visible
There are basically two different ways of hiding elements - you can either set their visibility to "hidden", or you can set their display to "none". CSS "visibility" property hides an element but retains its space in the flow of the document.
Re: How to make the javascript style visible
Basically there are many ways to Visible/hide, render/not render a control For ASP.NET webcontrols, this is because i have tried it out in ASP.NET and not so aware about the javascript, but am sure that you have the Visible property which can be set to true or false but that's serverside. The visibility option doesn't alter any other elements around or after the element, whereas the display option will "collapse" the element so to speak.
Re: How to make the javascript style visible
This could also be done by writing the asp:Button will cause a postback and you can make controls visible property true/false server side. Identify each line with an id or class and turn each one on/off as required. Then you can turn each line on/off using javascript and display:none or hidden as required.