Hi there,
I am not sure if this question comes under Html or javscript....
I have an asp page where I am trying to display/hide few table rows based on a drop down selection. the code is as follows,
I am using a javascript to make the display attribute to
block but this does not work in firefox as required. So I found a work around and used this,
this did not work in firefox. So I tried to use, visiblity : collapse and visibility : visible but this wont work in IE.
I would like to know if I can use a separate styling for IE and firefox in javscript..I know I can do that if I am using a style sheet for the whole page.. but not sure in java-script. Can somebody please guide me on this....
thank you
I am not sure if this question comes under Html or javscript....
I have an asp page where I am trying to display/hide few table rows based on a drop down selection. the code is as follows,
Code:
<table><tr bgcolor="#f3f3f3"> <td>School</td> <td><select name="selectschool1" id="selectschool1" onchange="changeSchool1();"> <option value="">Please select a school</option> <option value="NUSchool">School A</option> <option value="Other">School B</option> </select> <font color="red" size="1">*</font> </td> </tr> <tr bgcolor="#f3f3f3" id="schoolA" name="schoolA" style="display:none;"> <td>School A</td> <td><select name="schoolAnames" > <option value=""> Please select a school name</option> <% if not rsSchool.bof then rsSchool.moveFirst while not rsSchool.eof response.write"<option value=""" & rsSchool("SCHOOL_NAME") & """>" & rsSchool("SCHOOL_NAME") & "</option>" rsNuSchool.movenext wend %> </select></td> </tr> <tr bgcolor="#f3f3f3" id="schoolAmajor" style="display:none;"> <td>Major</td> <td><select name="major1" id="major1"> <option value=""> Please select a major</option> <% while not rsMajor.eof response.write"<option value=""" & rsMajor("id") & """>" & rsMajor("name") & "</option>" rsMajor.movenext wend %> </select></td> </tr> <tr bgcolor="#f3f3f3" id="schoolB" name="schoolB" style="display:none;" > <td> Other School</td> <td><input type = "text" name = "schoolBname" id="schoolBname" maxlength="50" size="30" value = ""/></td> </td> </tr></table>
block but this does not work in firefox as required. So I found a work around and used this,
Code:
function showSchool(thing) { theSection = document.getElementById(thing); theSection.style.display = 'block'; //theSection.style.display = '-moz-inline-table-block'; }
I would like to know if I can use a separate styling for IE and firefox in javscript..I know I can do that if I am using a style sheet for the whole page.. but not sure in java-script. Can somebody please guide me on this....
thank you
Comment