html - Javascript element visbility not working -
i have code need with. google style search function , have separate page screen reader users. form looks this:
<div id="main"> <input type="text" name="search" tabindex="<?php echo $tab++; ?>" onfocus="display_results_table()"><br> <input type="submit" name="submit" tabindex="<?php echo $tab++; ?>"> <input type="reset" name="reset" tabindex="<?php echo $tab++; ?>"> </div> <div id="results"> </div>
the reason using php tab indexes don't have put them in manually , have element called results beneath that. have styled each element so:
#main { border-radius: 1em; width: 50%; margin: 25%; background: #ffffff; border: #000000 medium solid; } #results { margin-left: 30%; width: 40%; margin-top: 10%; background: #ffffff; border: #000000 thin solid; display: none; }
my javascript looks this:
<script type="text/javascript"> function display_results_table() { document.getelementbyid("main").style.marginleft = "0%"; document.getelementbyid("main").style.width = "30%"; document.getelementbyid("main").style.borderradius = "0"; document.getelementbyid("main").style.borderright = "0"; document.getelementbyid("results").style.display = "block"; } </script>
the element mail performs expected cannot results element display. can point me in right direction?
Comments
Post a Comment