Solved

Java Script, ASP.NET - Move Cursor To Certain Location

Posted on 2007-11-25
2
465 Views
Last Modified: 2008-02-01
Experts,
I have the following function on a button click, and i need the cursor to move to the beginning of the table mentioned:

                           if(obj.value=='Continue, Details...')
                           {
                                 document.getElementById('tbl_QuestionDetails').style.display = '';
                                 document.getElementById('tbl_QuestionDetails').style.visibility ="visible";
                                 obj.value='Continue, Category...';
                                 return false;
                           }
0
Comment
Question by:feesu
2 Comments
 
LVL 29

Accepted Solution

by:
Göran Andersson earned 125 total points
ID: 20345347
The cursor can't move to a table, it can only move to an element that can have focus. Move it to the first field in the table:

document.getElementById('theIdOfSomeFormFieldInTheTable').focus();
0
 

Author Comment

by:feesu
ID: 20349137
Thanks alot!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now