Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Javascript only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
Javascript
Hiding a table in JavaScript
Hiding a table in JavaScript
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
F159753
New Member
Join Date:
Apr 2008
Posts:
31
#1
Hiding a table in JavaScript
Apr 7 '08, 04:21 PM
Hello,
what would be the code if I want to hide or show a table included some fields in Javascript?
Thanks
F
danp129
Recognized Expert
Contributor
Join Date:
Jul 2006
Posts:
323
#2
Apr 7 '08, 07:19 PM
Originally posted by
F159753
Hello,
what would be the code if I want to hide or show a table included some fields in Javascript?
Thanks
F
put the table in a div and change the visibility of the div.
[CODE=html]<script language="javas cript">
function ToggleTable(div id) {
cdiv=document.g etElementById(d ivid);
if (cdiv.style.dis play=='') {
cdiv.style.disp lay='none';
} else {
cdiv.style.disp lay='';
}
}
</script>
<input type=button value="Toggle" onclick="Toggle Table('results' );">
<div id="results">
<table>
<tr><th>a</th><th>b</th></tr>
<tr><td>1</td><td>2</td></tr>
</table>
</div>[/CODE]
Comment
Post
Cancel
F159753
New Member
Join Date:
Apr 2008
Posts:
31
#3
Apr 7 '08, 09:03 PM
That worked, Thank you.
Now I have a dropdown in a form. How should I know what is the Value of that in ASP?
Thanks
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment