Register  |  Login   
HomeUniversal ListSupport ForumsPortfolioContact UsPrivacy PolicyRefund Policy
  Forum  
SearchForum Home
  Universal List  Universal List Version 4.x  How can I hide ...
 How can I hide a table or form?
 
 4/21/2009 10:48:41 AM
sguo
15 posts


How can I hide a table or form?
I am creating a form which is for both Staffs and their supervisors. Staffs are only allowed to fill part of the form.  Supervisors can fill up rest of the form and is also able to edit the part for staffs.
So how can  I hide the portion for supervisors. I tried to use java script below to make it work.  But I failed.
_______________________________________
<script type="text/javascript">
function setTable(what){
if(document.getElementById(what).style.display=="none"){
document.getElementById(what).style.display="block";
}
else if(document.getElementById(what).style.display=="block"){
document.getElementById(what).style.display="none";
}
}
</script>
<a href="#" onclick="setTable('table1');return false">Show/Hide Table</a>
<table id="table1" style="display:block;">
    <tr>
        <td>This table will be hidden on click of the link above it.</td>
    </tr>
</table>
_____________________________________

How could it be fixed, please?
Thanks.

 4/21/2009 10:52:06 AM
host
257 posts
4th


Re: How can I hide a table or form?
JavaScript is not allowed at templates. You should make 2 separate pages. One for admins and another one for your users.
 4/22/2009 8:16:25 AM
sguo
15 posts


Re: How can I hide a table or form?
It make sense. I appreciate it.

  Universal List  Universal List Version 4.x  How can I hide ...
Free DotNetNuke dnndir.com DotNetNuke.fr About Us DotNetFreaks Asp.net Directory - Applications, Controls, ASP.NET hosting, Tutorials www.alldnnskins.com DotNetNuke Powered! Snowcovered
 
CookDNN