Register
|
Login
Home
Universal List
Support Forums
Portfolio
Contact Us
Forum
Search
Forum Home
Universal List
Universal List Version 4.x
How can I hide ...
How can I hide a table or form?
4/21/2009 9: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 9:52:06 AM
host
257 posts
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 7:16:25 AM
sguo
15 posts
Re: How can I hide a table or form?
It make sense. I appreciate it.
Page 1 of 1
Universal List
Universal List Version 4.x
How can I hide ...
Flat View
Tree View
Oldest To Newest
Newest To Oldest
CookDNN