473,434 Members | 1,430 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,434 software developers and data experts.

Help

Please I want help from you. I am doing project, I wrote a code html/javascript where this code works when I select an option this option is related to a fieldset where this fieldset(that include radio options) should be on and the other fieldsets should be off
Here is the code
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3.   <title>Registration</title>
  4. </head>
  5. <head>
  6. <script type="text/javascript">
  7. function choose_a()
  8. {
  9.  var x= document.getElementsByName("level").selectedIndex;
  10.  
  11.         if (x == document.getElementById("1"))
  12.  {
  13.   document.l.E[0].disabled=true;
  14. document.l.E[1].disabled=true;
  15. document.l.E[2].disabled=true;
  16. document.l.S[0].disabled=true;
  17. document.l.S[1].disabled=true;
  18. document.l.S[2].disabled=true;document.l.S[3].disabled=true;
  19. document.l.S[4].disabled=true;
  20. document.l.S[5].disabled=true;
  21. document.l.S[6].disabled=true;
  22. document.l.S[7].disabled=true;
  23. document.l.S[8].disabled=true;
  24.  
  25.  
  26.     }
  27.  
  28.  
  29.  }
  30.  else
  31.  if (x == document.getElementById("2"))
  32.  {
  33.   document.l.k.disabled="true";document.l.se.disabled="true";
  34.  
  35.  }
  36.  else
  37.  if (x == document.getElementById("3"))
  38.  {
  39.  
  40.   document.l.k.disabled="true";document.l.el.disabled="true";
  41.  
  42.  }
  43.  
  44. }
  45.  
  46. </script>
  47.  
  48.  
  49. </head>
  50.  
  51. <body>
  52. <form method="post" action="" name=L>
  53.     <table border="1" align="center"><Caption><h1>Registratiopn New Year</h1></caption>
  54.     <tbody>
  55.       <tr><td colspan="2" align=center>Level</td>
  56.       </tr>
  57.  
  58.       <tr>
  59.          <td colspan=2 align=center><select name="level">
  60.           <option selected id="1" onClick=choose_a();>
  61.             Kinder Garden
  62.           </option>
  63.  
  64.           <option id="2" onClick=choose_a();>
  65.             Elementary
  66.           </option>
  67.  
  68.           <option id="3"onClick=choose_a();>
  69.             Secondary
  70.           </option>
  71.         </select></td>
  72.       </tr>
  73.  
  74.       <tr>
  75.         <td colspan="2" align=center>Class</td>
  76.       </tr>
  77.  
  78.       <tr>
  79.         <td colspan=2 align=center>
  80.           <fieldset name=k>
  81.             <legend id=A>Kinder Garden</legend><input dir="ltr" value="1" checked type="radio" name="kg">Nursery<br> 
  82.    <input dir="ltr" value="2" type="radio" name="kg">KG1<br><input dir="ltr" value="3" type="radio"
  83.             name="kg">KG2<br>
  84.           </fieldset>
  85.         </td>
  86.       </tr>
  87.    <tr><td colspan=2 align=center>   
  88.         <fieldset name=el><legend id=B>Elementary</legend>
  89.           <input type="radio" name="E " dir="ltr" value="1">First<br><input type="radio" name="E " dir="ltr" value="2">Second<br>
  90.           <input type="radio" name="E " dir="ltr" value="3">Third<br><input type="radio" name="E " dir="ltr" value="4">Fourth<br>
  91.           <input type="radio" name="E " dir="ltr" value="5">Fifth<br><input type="radio" name="E " dir="ltr" value="6">Sixth<br>
  92.           <input type="radio" name="E " dir="ltr" value="7">Seventh<br><input type="radio" name="E " dir="ltr" value="8">Eeigth<br>
  93.           <input type="radio" name="E " dir="ltr" value="9">Ninth
  94.         </fieldset>
  95.       </td>
  96.      </tr>
  97.  
  98.     <tr>
  99.       <td colspan="2" align=center>
  100.         <fieldset name=se><legend id=C>Secondary</legend>
  101.           <input type="radio" name="S" value="1">Second
  102.    <input type="radio" name="S" value="2">Bac1
  103.                <select name="Bac1"><option value="1" SELECTED>Sientific</option>
  104.                             <option value="2">Literal</option>
  105.                </select>
  106.          <input type="radio" name="Bac2" value="3">Bac2
  107.               <select name="Bac2"><option value="1" SELECTED>Socio Economic</option>
  108.                            <option value="2">Life Science</option>
  109.                                   <option value="3">General Science</option>
  110.               </select>
  111.          </fieldset>
  112.       </td>
  113.     </tr>
  114.  
  115.     <tr>
  116.       <td><input type="submit" name="Submit" value="Register" width="100%" height="100%"></td>
  117.       <td><input type="reset" name="Reset" value="Clear" width="100%" height="100%"></td>
  118.    </tr>
  119.     </tbody>
  120.   </table>
  121.   </form>
  122. </body>
  123. </html>
  124.  
Looking forward for hearing from you
Thanks
Aug 22 '10 #1
0 868

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

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
9
by: Tom | last post by:
A question for gui application programmers. . . I 've got some GUI programs, written in Python/wxPython, and I've got a help button and a help menu item. Also, I've got a compiled file made with...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
5
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
8
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
10
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
1
by: trunxnirvana007 | last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' 'UPGRADE_WARNING: Couldn't resolve...
0
by: hitencontractor | last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003. I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About. The application...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.