[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Scroll to end of text in a text box on a page reload/text box focus

Posted on 2004-10-08
4
Medium Priority
?
251 Views
Last Modified: 2012-08-14
So I have a text box which gets focus on a page reload.  Netscape puts the cursor at the end of the line, but IE puts me at the beginning.

DOES ANYONE KNOW how to move the cursor to the end of text in a text box?

<form name=myform>
<input type=text name=thattextbox value="somethingelse">
</form>
<script>
document.forms['myform'].thattextbox.focus();
//thattextbox.scrollTo(End);???????  Would this work????
</script>

Thanks,
Mike
0
Comment
Question by:oreomike
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
justinbillig earned 2000 total points
ID: 12258404
document.forms[ 'myform' ].thattextbox.value += " ";

that should scroll to the end
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12258497
<BODY onload="document.the_form.the_text.focus();document.the_form.the_text.value+=''">
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12258528
or, to be completely anal:

<body onload="document.forms['the_form'].elements['the_field'].focus(); document.forms['the_form'].elements['the_field'].value += '';">
0
 
LVL 1

Author Comment

by:oreomike
ID: 12258607
thanks all

the first answer is what I was looking for
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question