0

The following html code includes a part used to enter time and is validated calling the relevant function using onblur() but when the javascript function fires the text box containing the time jumps to the left corner! how can i stop this?

  <td height="50" rowspan="2">
          <span class="headingbox">Expected Time &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </span>
          <span style="width:100%;text-align:center;">
            <input type="time" id=time autofocus name=DPTime onblur="return test()" onfocusout="hid('timeerror2');" onfocus="show('timeerror2');" min="09:00:00" max="22:00:00" />


          <span class="poperror" id="timeerror2"> Pharmacy is opened from 9AM to 10PM </span>
        </td>

      </tr>
        <tr>
        <td></td>

            <td><br> <label id=check align=right></label></td>


        </tr>

Here when the test() function is called a relevant value is displayed in the label with id=check! At that point the time box jups to the left side! how to prevent this?

1 Answers1

0

Just for reference , not sure if these are affecting the result or not:
1. you have rowspan="2" but you have 3 span tag there
2. your 2nd span tag did not have the close tag < / span >

CS_YAN
  • 41
  • 5