473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to Hide/Show a row through combobox?

i want to know that how can i hide/display a row depending on the selection in the combobox!
for eg :- if i have 3 names in combobox as neha,kirti, and ritu then suppose i select neha then a particular row shoould hide!
Jun 28 '08 #1
2 3283
idsanjeev
241 100+
hi
try to use onchange event
example
Expand|Select|Wrap|Line Numbers
  1.  
  2. <script type="text/javascript">
  3. function toggle_state(obj) {
  4.     // here we check the value of your select-box
  5.    //var val = obj.value == 1; 
  6.  
  7.     if (obj.value == 1)
  8.  {
  9.  val=1;
  10.  alert('change')
  11.  }
  12.  else
  13.  {
  14.  val=0;
  15.  }
  16.  
  17.     var input_node = document.getElementById('myfield');
  18.  
  19.     input_node.style.visibility = val ? 'hidden' : 'visible';
  20.  
  21. }
  22.  
  23. </script>
  24. <select onChange="toggle_state(this);" >
  25. <option value="0">kriti</option>
  26. <option value="1">juhi</option>
  27. </select>
  28. <input type="text" id="myfield"> 
Jun 28 '08 #2
jhardman
3,406 Expert 2GB
i want to know that how can i hide/display a row depending on the selection in the combobox!
for eg :- if i have 3 names in combobox as neha,kirti, and ritu then suppose i select neha then a particular row shoould hide!
Notice, as Idsanjeev hinted at, you do this with a client-side script, not a server-side script. ASP can not help you to do this, so using javascript as Idsanjeev suggests would be the way to go.

Jared
Jul 1 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
3
by: Bob Alston | last post by:
Anyone know how to hide the down arrow that is at the far right of a combo box? I have seen it done (with auto display drow-down, of course). Bob
0
by: Efkas | last post by:
I have a full custom application with some widged extending Controls like Label and PictureBox. I build a menu with these widgets. When I click on one of them, it calls a function to display...
2
by: | last post by:
I have a page where I have 3 combo boxes listed in a column. sort of like: combo1 combo2 combo3 Based on which one is clicked, the others are supposed to hide (i.e. combobox.visible =...
4
by: bridgemanusa | last post by:
Hi All: I have a very long page of html that I want to take portions and hide them in divs, then show when a link is clicked. I have the hide show part working when the link is clicked, however...
0
by: Gian Paolo | last post by:
this is something really i can't find a reason. I have a form with a tabcontrol with tree pages, in the second page there is a Data GRid View. Plus i have a class. When i open the form i...
5
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of...
1
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. ...
3
by: Simon | last post by:
Dear reader, On the event "Lost focus" I make the ComboBox invisible but the massage pops up "You can't hide a control that has the focus." But this code is written in the "Lost focus"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.