Jump to content

cursor position

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
techker

techker

    Programmer

  • Members
  • PipPipPipPip
  • 136 posts
hey guys is there a way to always keep the cursor in the form input?

cause i have this membership scanning page so the client scans and it goes to an info page the comes back to the initial scaning page,but the cursor is not in the input box...

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You'll have to be a lot more specific. What language/platform are you talking about for starters?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Very hard to answer that question without knowing the language you are using.

#4
PythonPower

PythonPower

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 230 posts
I think he's talking about an HTML form.

This code partially works:

<html>
    <head>
        <title>Example of keeping cursor position</title>
    </head>
    <body>
        <h1>Example of keeping cursor position</h1>
	
        <form>
            <input id="textBox" type="text" onblur="this.focus()" />
        </form>
        
    </body>
</html>

  • Works fine in IE 8 (but the cursor moves to the start if you try to click off the box)
  • Doesn't work in Firefox at all
  • The cursor doesn't stay in the input box, but the box stays selected in Chrome