Jul 20, 2008

How To Focus Div

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

How To Focus Div

kvarnerexpress
I have various divs flowing around in my page where
onkeydown event handlers are assigned.

Is there any way I can set focus to a div or at least
control who has focus when one looses it (blur ?). In
my special case i present a list of database results
after the user entered some search data. To avoid
using the mouse I want the user to be able to select
the record by siply hitting the Keybord. How can I move
focus form the textox to the table or div ??

Reply

Lozbo
I dont think I understood everything, could you post a link to the website? From my point of view you have the answer yourself, Im not an advanced js programmer but i think that if you set those 'onkeydown' events for different keys, you can tell js to set the focus to the div you want, I think it would be something like this:

setfocus(document.myform.yerDiv)

Reply

iGuest
Setting focus on div.
How To Focus Div

So simple in jQuery

$("#myDiv").Focus();

-reply by Aamir Afridi

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. focus div html - 12.42 hr back. (1)
  2. focus div - 33.92 hr back. (1)
  3. div html focus - 41.33 hr back. (1)
  4. div focus - 30.93 hr back. (2)
Similar Topics

Keywords : focus, div

  1. Hackers Focus Efforts On Firefox, Safari, And Office
    (1)
  2. Adding Accessibility Features To Your Pages
    Using the :active/:focus pseudo-class (0)
    Here is a tip for its use on your site. Using CSS to tell your visitors where they are on your site
    can be fairly complicated depending on the method you use. The CSS Specifications have defined a
    "pseudo-class" for the link which currently has 'focus' and another pseudo-class for the
    'active' state. They can be used to tell your visitors where their cursor is on the page
    and you do that be altering the CSS for the link which currently has the focus and those which are
    being activated. The ' active' state only occurs momentarily while the ....
  3. Focus On Keyword Content
    (1)
    QUOTE With the growth of blogs of past several years many people have been jumping on the
    bandwagon trying to get a piece of that internet money pie. The Google Adsense has provided bloggers
    the opportunity to capitalize on the traffic generated at their websites and another industry has
    emerged often referred to as Adsense blogging. Adsense blogging is a great way to earn income online
    if done correctly. When developing an Adsense blog one of your main focuses should be on the
    selection of profitable and targeted keywords, and then on developing informative and ori....
  4. Why Can't I Focus And I Hate My Parents.
    Why can I not make them happy? (13)
    These final days of school are starting to become painful as hell. Every class I'm not doing so
    hot in, and nothing I do works. Sure I'll spend 4 hours on a project, but its not right, sure
    I'll spend 2 hours on a 40 point homework assignment, and magiclly the book disappears. I
    can't win, I can't do anything right. I wish I didn't start to see this until now and I
    could have tried and stop my bad habits and train my forgetful mind, but right now is to late.
    I'm *BLEEP*ed. Its not that I forget doing homework or anything, its that I can'....
  5. Shoot A Pic, Focus Later
    new technology for digital cameras (11)
    Me again:)Searching the web for my science news thirst i've stumbled over some words about
    refocusing of blurred photos,method and technology developed at Stanford University.The primordial
    use would be in sports where each photograph ca't be re-photographed or surveillance systems.Of
    course even an non-profesional photographer could take advantage of this technology:).It's
    better described at this adress: http://www.eurekalert.org/pub_releases/200...s-sap110905.php ....
  6. How To Focus
    (11)
    Hey i dunno if this tutorial giveing but if u want other ppl to focus on one thing or only let one
    thing show this tutorial might help /biggrin.gif' border='0' style='vertical-align:middle'
    alt='biggrin.gif' /> BTW if the dentist has blue spots its the forums fault cause
    http://www.heathrowe.com/tuts/depthoffield/6.gif and its clean /smile.gif' border='0'
    style='vertical-align:middle' alt='smile.gif' /> QUOTE 1. Grabbed any image off the net as an
    example. In this case I just want to simply give focus to the dentist and blur the background.
    --------------....
  7. Stop A Window From Loosing Focus?!?
    For autosurf users... (1)
    Maybe you've heard about a great way to make money online using Paid-To-Promote. If not you
    should check this My Webpage . Anyway the great thing about this website is that you can use the
    autosurf programs but I have a problem with them. For those who use autosurf ... you know how the
    browser window keeps poping up in a very anying way and I was wondering if you know some kind of
    software to stop a window from loosing focus?....

    1. Looking for focus, div

Searching Video's for focus, div
advertisement



How To Focus Div



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE