Mouse pointer send back to same text box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chathurajaya
    New Member
    • Apr 2015
    • 1

    Mouse pointer send back to same text box

    hi all,

    I'm creating barcode reading system. When web page come there are text box and mouse pointer is there. In that case customer can read the barcode and see product information. if customer click on the product image mouse pointer goes there. after that customer can't read the barcode. because mouse pointer not in the text box. my problem is how can i get back mouse pointer in to the text box. i try refresh page. if page refresh within 1 or 2 second customer can't read the product information. i want get back mouse pointer to same text box without refreshing page within 1 or 2 second. how can i do that?
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    You can't control the mouse pointer, but you can use jquery or javascript to reset the focus of the cursor.

    Code:
    <script type="text/javascript">
      function SetFocus(id){
        document.getElementById(id).focus();
      }
    </script>

    Comment

    Working...