SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2005
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Focus on a row after select change

    Hi I wonder if anyone can help. I have an application where users select a number from 10 dropdown boxes in table rows. The problem is if they choose the last value the cursor drops down to several rows below. What i really want to do is to focus the row and move the cursor back to the row the user just selected. I am sure its really simple but i just cant do it

    I tried stuff like

    $.scrollTo('table tr.debit');
    $('table tr.debit').focus();
    $('table tr.debit').select();

    But the cursor doesnt jump back to the row and the row doesnt highlight (debit and credit classes highlight the row on hover).

    Any ideas?

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,717
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Steve100 View Post
    Any ideas?
    A test page that exhibits the problem will allow us to find the root cause of your problem.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •