LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-01-2004, 04:30 PM   #1
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Rep: Reputation: 30
DHTML Trouble


I want to make a table visible when a user clicks a bit of text. I have included a simplified sample of what I have so far so you can see what I am looking for.


Code:
<body>
<script>
function makevisible(elmnt){
document.getElementById(elmnt).style.visibility = "visible";
}
</script>
<a onclick="makevisible('table1')">Link</a>
<br>
<table name="table1" style="visibility:hidden;">
<td>
Hello
</td>
</table>
</body>


Boffy
 
Old 05-02-2004, 08:32 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Here you go:
Code:
<html>
 <head>
  <title>Visibility Test</title>
  <script>
function makevisible(elmnt){
document.getElementById(elmnt).style.visibility = "visible";
}
  </script>
 </head>
 <body>
  <a onclick="javascript:makevisible('table1')">Link</a>
  <br>
  <table id="table1" style="visibility:hidden;">
   <tr><td>Hello</td></tr>
  </table>
 </body>
</html>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble !!! fresco Red Hat 1 05-16-2004 01:05 AM
trouble ahead, trouble behind....trouble with mplayer Goonie Linux - Software 3 07-02-2003 02:29 AM
Does this DHTML tabs work in Konqueror? dhtmlkitchen Linux - Software 6 11-19-2002 10:19 AM
I'm in trouble GT I.N.C Linux - Newbie 123 10-13-2002 02:29 PM
Kernel Trouble (Not actually trouble though) chem1 Linux - General 4 10-01-2002 01:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration