clmlbx
Technomancer
I made a website and it has a button. when user clicks on it I want to change visibility of another DIV.(with css). at default it will be hidden.
so button div ID is 'apply' and Div I want to toggle visibility it's ID is 'for'.
and below is Javascript code.. what's wrong in it. ?
one more thing if anyhow needed, this below code is in External file..
so button div ID is 'apply' and Div I want to toggle visibility it's ID is 'for'.
and below is Javascript code.. what's wrong in it. ?
one more thing if anyhow needed, this below code is in External file..
Code:
var apply=document.getElementById("apply");
apply.onclick=function(){
var form=document.getElementById("for");
form.style.visibility="visible";};
Last edited: