| | |
Change the focus to table row
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Only things that can accept focus can receive focus, which would be form objects like text boxes, radio buttons etc... and hyperlinks. You should be able to do it with the focus() function.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
for IE and FF You can set focus to object and embed respectively.but i m not sure about other browser
Help as an alias
I think programming is great................
Tour Travel weblink by me and about Tour ,
Go To My Home Page and I m in Webdevelopment.
I think programming is great................
Tour Travel weblink by me and about Tour ,
Go To My Home Page and I m in Webdevelopment.
•
•
•
•
Hi All,
Is there any way to set the focus to a table row using javascript so that subsequent key press events can iterate through the table rows.Please help me to solve this.
Thanks
As nikesh.yadav already pointed, there are only two true conventional browsers that will handle focus as expected for elements other anchors and forms for certain. That is, IE and FX.
You can write a loop function that iterates through table elements that should receive focus and use a declaration like:
tag[i].tabIndex = "auto"; to make them receive focus. This additionally prevents you from breaking the tab order on your document.
It will enable your client to tab through your table rows, cells and/or other desired elements the conventional way, (or browser specific), without having to explain that there are keys with added functionality and how to use them.
Regards.
![]() |
Similar Threads
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- Struggling with Captcha (PHP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Disable <div> tag using javascript
- Next Thread: Diffusion effect in javascript
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array browser bug captchaformproblem cart checkbox child class close codes createrange() css cursor date debugger decimal dependent design disablefirebug dom dropdown editor element embed engine enter error events explorer ext file firefox focus form forms frameworks getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe images index internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl listbox maps masterpage math media menu mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post problem programming progressbar prototype redirect runtime safari scale scriptlets scroll search security shopping size software toggle unicode w3c web wysiwyg \n





