if you are trying to hide a display due to a security issue then an easy way to do that is to store the code in a DB table and then when you want to display it just read each line of code and populate a span or division with the contents of the DB table.
For example, let's say you have some code that only user 123 should see.
1) Test for user 123
2) If user 123 then load up a variable called myhiddencode with some code read from a DB table. Then populate a division with that code
Code:
document.getElementById(mydivision').innerHTML = '<div >' + myhiddencode + '</div>' ;
3) If not user 123 then
Code:
document.getElementById(mydivision').innerHTML = '<div > </div>' ;
Then only user 123 will see the code and it will not be part of the page source for any other user so they cannot see it even if they dump the entire page source.