Expand|Select|Wrap|Line Numbers
- <script> function displayFields() { document.getElementById('Label12').style.display = 'none'; document.getElementById('Label13').style.display = 'none'; document.getElementById('Label22').style.display = 'none'; document.getElementById('Label23').style.display = 'none'; } function dispHideFileds() { alert(""); if (document.forms[0].number.value == 'One') { document.getElementById('Label13').style.display = ''; document.getElementById('Label12').style.display = 'none'; } else { document.getElementById('Label12').style.display = ''; document.getElementById('Label13').style.display = ''; } } function dispHideFields1() { if (document.forms[0].number1.value == 'One') { document.getElementById('Label23').style.display = ''; } else { document.getElementById('Label22').style.display = ''; document.getElementById('Label23').style.display = ''; } } </script></HEAD> <BODY pageLoaded="displayFields()">//pageLoaded must be replaced onLoad<form><table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="25%">Select :</td> <td align="left" width="25%" id="Label11"><selectname="number" onchange="dispHideFileds()"> <option value="">Select</option> <option value="One">One</option> <option value="Two">Two</option> </select> </td> <td align="left" width="25%" id="Label12"><selectname="fruit" > <option value="">Please Select One</option> <option value="Apple">Apple</option> <option value="Orange">Orange</option> </select> </td> <td align="left" width="25%" id="Label13">This messagehas to be displayed here so that the user can read this and takeappropriate action.</td> </tr> <tr> <td width="25%">Select Direct Deposit:</td> <td align="left" width="25%" id="Label21"><selectname="number1" onchange="dispHideFields1()"> <option value="">Select</option> <option value="One">One</option> <option value="Two">Two</option> </select> </td> <td align="left" width="25%" id="Label22"><selectname="fruit1" > <option value="">Please Select One</option> <option value="Apple">Apple</option> <option value="Orange">Orange</option> </select> </td> <td align="left" width="25%" id="Label23">This messagehas to be displayed here so that the user can read this and takeappropriate action.</td> </tr> </table> </td> </tr> </table></form></BODY></html>
If the first dropdown value is"one" then i only show a message next to it.
If the first dropdown value is"two"then i show another dropdown next to it and then the message.
Now i have two such rows which has the same behaviour as above .If i select value "One" for the first row .and In the second row i select value"Two" from the dropdown you can see that the fields jump and also the message will not be properly aligned how do i make it align properly.I would really appreciate your help.I have no idea how to make it work without jumping and also the message is properly aligned for bothe rows.
If someone could help me with above code that would be really great.
Thnaks
Prathna