tags:

views:

99

answers:

1
dojo.addOnLoad( function() {
 attach on click to id="textDiv"
 dojo.query('#Specific_consultant-Yes').onclick( function(evt) {
//    document.getElementById("Consultants").style.visibility = "hidden";
        dojo.style.setVisibility('Consultants', false);
//alert('hai');
});
});

I tried to write code like this in zend in views page . the alert command works but the hiding of element does not work!!!any problem in code?

A: 

hi,

try to use the following code:

dojo.style("Consultants", "visibility", false);

i suspect the id of the element to be hidden is "Consultants"?

if this is not working, please provide your html-code.

henchman
It did not work <div class="field50Pct"><div class="fieldItemLabel"><label for="Consultants" class="required">Consultants</label></div><div class="fieldItemValue"><select name="Consultants" id="Consultants"> <option value="1" label="Krishna">Krishna</option> <option value="2" label="Krishna1">Krishna1</option> <option value="3" label="Pradeep">Pradeep</option> <option value="4" label="Sudeep">Sudeep</option></select></div></div><div class="clear"></div>
pradeep
dojo.addOnLoad( function() { dojo.query('#Specific_consultant-Yes').onclick( function(evt) {// document.getElementById("Consultants").style.visibility = "hidden";alert('hai'); dojo.style.setVisibility('Consultants', false);});});is the dojo code
pradeep