By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,661 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

Related to give me in javascript or other programming language

P: 2
Respected Sir,
I am new in java i sending you a source file please make its html site and see.
My question is that its a very big table so at above in this table i make different icon so how can i connect this icon with this table so by entering the detail in icon i can see only this much table. For example in this icon i enter only H K Pathak so i can see the detail in the table related to only H K Pathak.
Here i attech the text document please convert in thml file and just see.
So please give me such type of javascript or any programm.
Nov 6 '09 #1
Share this Question
Share on Google+
5 Replies


RamananKalirajan
100+
P: 607
Yep, you can very well do that. I am attaching a Sample with this... I am not sure wether you are looking for this one. Have a look over that.. Please post back if you have any doubts on that one.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE> New Document </TITLE>
  5. <META NAME="Generator" CONTENT="EditPlus">
  6. <META NAME="Author" CONTENT="">
  7. <META NAME="Keywords" CONTENT="">
  8. <META NAME="Description" CONTENT="">
  9. <script type="text/javascript">
  10.     function doThis()
  11.     {
  12.         var xx= document.getElementById('mySelect').selectedIndex;
  13.         if(xx=="1")
  14.         {
  15.             document.getElementById('1').style.display='block';
  16.             document.getElementById('2').style.display='none';
  17.             document.getElementById('3').style.display='none';
  18.         }
  19.         else if(xx=="2")
  20.         {
  21.             document.getElementById('1').style.display='none';
  22.             document.getElementById('2').style.display='block';
  23.             document.getElementById('3').style.display='none';
  24.         }
  25.         else if(xx=="3")
  26.         {
  27.             document.getElementById('1').style.display='none';
  28.             document.getElementById('2').style.display='none';
  29.             document.getElementById('3').style.display='block';
  30.         }
  31.         else
  32.         {
  33.             document.getElementById('1').style.display='none';
  34.             document.getElementById('2').style.display='none';
  35.             document.getElementById('3').style.display='none';
  36.         }
  37.  
  38.     }
  39. </script>
  40. </HEAD>
  41.  
  42. <BODY>
  43. <select id="mySelect" name="mySelect" onchange="doThis()">
  44. <option value="0">Select</option>
  45. <option value="1">Rahman</option>
  46. <option value="2">Manirathnam</option>
  47. <option value="3">Tom Cruise</option>
  48. </select>
  49. <table>
  50. <tr id="1" style="display:none;">
  51. <td><center>1</center></td>
  52. <td><center>----</center></td>
  53. <td><center>----</center></td>
  54. <td><center>L</center></td>
  55. <td><center>EP</center></td>
  56. <td><center><A href="nt.html.doc">H.A.Pahtak</A></center></td>
  57. <td><center>Filing cabinet and storwel</center></td>
  58. <td><center>As per spec</center></td>
  59. <td><center>IPR/SST/OA/003/1996-97</center></td>
  60. <td><center>16/07/1996</center></td>
  61. <td><center>48,810.70</center></td>
  62. <td><center>M/s. Godrej & Boyce <br>MFG.CO.LTD.</center></td>
  63. </tr>
  64. <tr id="2" style="display:none;">
  65. <td><center>2</center></td>
  66. <td><center>----</center></td>
  67. <td><center>----</center></td>
  68. <td><center>F</center></td>
  69. <td><center>EP</center></td>
  70. <td><center>H.A.Pathak</center></td>
  71. <td><center>120 m3/hr rotary pump</center></td>
  72. <td><center>04 nos.</center></td>
  73. <td><center>IPR/SST/F/020/1996-97</center></td>
  74. <td><center>16/09/1996</center></td>
  75. <td><center>FF 22,5000.00</center></td>
  76. <td><center>M/s.Alcatel Vacuum GmbH</center></td>
  77. </tr>
  78. <tr id="3" style="display:none;">
  79. <td><center>3<center></td>
  80. <td><center>----<center></td>
  81. <td><center>----<center></td>
  82. <td><center>F<center></td>
  83. <td><center>EP<center></td>
  84. <td><center>H.A.Pathak<center></td>
  85. <td><center>5000 1/s TMP<center></td>
  86. <td><center>08 nos.<center></td>
  87. <td><center>IPR/SST/F/031/1996-97<center></td>
  88. <td><center>07/11/1996<center></td>
  89. <td><center>DM 6,64,512.00<center></td>
  90. <td><center>M/s.Pfeiffer Vacuum GmbH<center></td>
  91. </tr>
  92. </table>
  93. </BODY>
  94. </HTML>
  95.  
Thanks and Regards
Ramanan Kalirajan
Nov 9 '09 #2

Dormilich
Expert Mod 5K+
P: 8,639
@RamananKalirajan
  1. why not using the select’s value directly?
    Expand|Select|Wrap|Line Numbers
    1. var xx = this.value;
  2. IDs must never ever start with a number (see ID constraints, resp. the Name type definition (use the link))
  3. <center> is not necessary, a simple CSS line can do the same (and saves you quite some transfer volume)
    Expand|Select|Wrap|Line Numbers
    1. td { text-align: center; }
Nov 9 '09 #3

RamananKalirajan
100+
P: 607
@ Dormilich, I have learnt a thing which I dont know till now.. I wont start the Id with a number. Thanks man...

Thanks and Regards
Ramanan Kalirajan
Nov 9 '09 #4

Dormilich
Expert Mod 5K+
P: 8,639
@RamananKalirajan
wait ’til you use XHTML. you’ll be prompted with every XML error that occurs.
Nov 9 '09 #5

P: 2
Thank You Very much Sir
Nov 9 '09 #6

Post your reply

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