PDA

View Full Version : Getting the text cursor to automatically be in the "Message:" box?


Gutspiller
01-27-2002, 07:59 PM
So that people can start typing after replying or starting a new thread, without having to click their mouse or hit tab to get the blinking text cursor in the box.

I don't think this would really be a hack so I didn't post it in requests. Somebody let me know how to do this or if I DO need to ask this in the request forum.

Any help on this subject would be greatly appreciated.

Thanks.

djr
01-27-2002, 08:36 PM
Javascript: Focus on a form-field

This script makes the cursor start in a form-field when the page is loaded. Therefor it's handy to put this script behind the closed FORM TAG. You can also create a function and use it in the BODY OnLoad.

Replace 'formname' for the NAME of the FORM. And replace inputfieldname for the NAME of the INPUT-TAG.


document.formname.inputfieldname.focus();

Gutspiller
01-27-2002, 10:35 PM
Originally posted by djr
Javascript: Focus on a form-field

This script makes the cursor start in a form-field when the page is loaded. Therefor it's handy to put this script behind the closed FORM TAG. You can also create a function and use it in the BODY OnLoad.

Replace 'formname' for the NAME of the FORM. And replace inputfieldname for the NAME of the INPUT-TAG.


document.formname.inputfieldname.focus();


I don't have that good of an understanding of this stuff yet. Can you please explain how I can get that line of code to work with a reply to somebodys post or when creating a new thread?

Now that I think about it, it would be useful on the PMs and PM replys. (both single users, and buddy list)

If somebody can help me out with this problem, that would be great.

Thanks.

Gutspiller
02-04-2002, 09:27 PM
BUMP!

Gutspiller
02-07-2002, 08:59 PM
Bump again. (I will continue until somebody helps me) :p

patrick1110
08-04-2008, 08:41 AM
Bump