Controlling the cursor position when the page is loading

I have a page which has a textArea at http://dot.kr/x-test/html/focus_in_textArea.php.

The page has 100 lines Inside the textArea.

if you enter “100” on the caret position box below the textArea and click the submit button named “set position”.
the cursor will be positioned in the 35th line.

if you enter “200” on the caret position box below the textArea and click the submit button named “set position”.
the cursor will be positioned in the 68th line.

I like to make it like the following.

if you open the page with a url parameter named “caret” with the value of 100 like the following
http://dot.kr/x-test/html/focus_in_textArea.php?caret=100
the cursor will be positioned in the 35th line. when the page is loading.

if you open the page with a url parameter named “caret” with the value of 200 like the following
http://dot.kr/x-test/html/focus_in_textArea.php?caret=100
the cursor will be positioned in the 68th line. when the page is loading.

Hi there joon1,

try it like this…

[code]

[/code]

coothead

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.