Show+Hide+Div+Tag

This is an example of how you can use Javascript with RB to hide or show a div tag, you can also use this on a table or table row by giving the row or table an id name and passing it to the toggle function. Of course the toggle function would have to be updated to allow the passing of a value for the id.

Note: To start the div hidden; add this code inside the div tag: 'hidethis' style=""display: none;"" code format="vbnet" 'Very simple way to show or hide a div tag by div ID   'Requires RB v1.01 'Ben Jimenez

'This java script function will do the work of hiding the div tag 'none = do not show, 'block'= show

head "       function toggle(DivID) {            if( document.getElementById(DivID).style.display == 'none' ) {                document.getElementById(DivID).style.display = 'block';            } else {                document.getElementById(DivID).style.display = 'none';            }        }    "

'add an onClick option to this div tag and set the value to the javascript function name 'had to use the double "" for the pointer value '' would not work. html "Click Me! "

print

'This is our div that we will hide by passing the id name to the toggle function

div hidethis print "Line one" print "Line two" print "Line three" print "Line four" end div code