Jump to content


Setting Cursor Position in Browser

  • Please log in to reply
4 replies to this topic

#1 Endrew

  • Members
  • PipPip
  • Member
  • 15 posts

Posted 17 May 2006 - 12:40 AM

Is there a way to place anchor in specific location in browser? Like using X,Y coordinate.

#2 alecjw

  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts
  • LocationHatfield, Herts, UK

Posted 27 August 2006 - 04:25 PM


#3 Daniel0

  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 28 August 2006 - 05:41 PM

Yes. Here is an example:
<a href='http://phpfreaks.com' style='position:absolute; left: 20; top: 77;'>PHP Freaks</a>

#4 AndyB

  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 28 August 2006 - 07:58 PM

Not obvious quite what you want, but html anchors might be what you want (as in somepage.html#top). If not, then maybe you want to use the onLoad function to place the focus on a particular form element, or to use the javascript scrollTo(x,y) function.

All depends what you're really trying to accomplish.
Legend has it that reading the manual never killed anyone.
My site

#5 pkSML

  • Members
  • PipPipPip
  • Advanced Member
  • 191 posts
  • LocationBucyrus, Ohio

Posted 18 September 2006 - 09:56 PM

Ya' learn something new everyday! This is a pretty cool concept.

Updating Daniel0's code...

<a name="anchor1" style="position:absolute; left: 20; top: 500;">anchor1</a>

This makes the anchor not a hypertext link. Rather, it is an anchor that can be accessed like /index.htm#anchor1.

Endrew, is this what you're trying to do, or are you trying to put a blinking cursor in an input field (like Google does)?

Need a LitlURL?

Got code to share? --> The Code-Bin

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users