This is my code line throwing error
$get("Panel1").style.visibility= "visible";
This line works well on normal page .But whenever using it on child page which owns a master page it throws the error as “Microsoft JScript runtime error: Unable to get value of the property ‘style’: object is null or undefined”. I am a great beginner to javascript . I am using this on Asp.Net 3.5 .Any one know this issue before .
Your problem is probably because you do not use the rendered id, that is change if you use the same panel on dipper page. And because you do not use the correct id, the
$get()part return thenull or undefined. Change your code to:and render the panel1 id as it will final be on the html page.
What you should have to solve it alone: You could on the page to see the “view page source” from your browser utility and see if the
Panel1id exist on your html struct, there you can find what was the correct id and the reason that was not found. So the point here is that we look the html rendered page to find out whats going wrong with the scripts.