Welcome visitor
* Login
* Register
It is currently September 15th, 2019, 11:57 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  select dropdown menu should show and hide things
PostPosted: January 22nd, 2010, 6:48 am 

Posts: 15
Hi, I am using a form with a drop down select menu and according to the option selected a table will be shown. I do already have the 3 tables, I just need help to hide and show the desired table. Thanks for your help.


Top
 Profile  
 
  Re: select dropdown menu should show and hide things
PostPosted: January 22nd, 2010, 5:34 pm 
User avatar

Posts: 112
<script type="text/javascript">
function mTables(n)
{
if(window.rTable)
  {document.getElementById('t'+rTable).style.display='none';}
if(n!=0)
  {document.getElementById('t'+n).style.display='block';
  rTable=n;}
}
</script>
<select id="menu" onchange="mTables(this.value);">
<option> </option>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<table id="t1"><tr><td>one</td></tr></table>
<table id="t2"><tr><td>two</td></tr></table>
<table id="t3"><tr><td>three</td></tr></table>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron