This should do it.

<script type="text/javascript">
function selTA()
{
document.myform.myfield.focus();
document.myform.myfield.selectionStart=0; 
document.myform.myfield.selectionEnd=0; 
}

window.onload = selTA;
</script>

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com


-----Original Message-----
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 06, 2005 2:38 PM
To: CF-Talk
Subject: RE: Javascript help.

Hmmm guess that only places the cursor at the beginning in IE... gimmee a
minute :)
 
...:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-----Original Message-----
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 06, 2005 2:31 PM
To: CF-Talk
Subject: RE: Javascript help.

function selTA()
{
document.formname.fieldname.focus();
}

window.onload = selTA;
 



....:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-----Original Message-----
From: J W [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 06, 2005 2:24 PM
To: CF-Talk
Subject: OT: Javascript help.

I have been beating my head around for the better part of today trying to
figure this out..

I am prefilling a textarea with some information.

When the page loads, I would like to set focus to the text area and have the
cursor position set to the first character in the textarea with the
prefilled info. Is this even possible or am I just missing something stupid.
I have scoured google to no avail...

Thanks,
Jeff








~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226272
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to