input focus

How can I set input focus to a specified field after refreshing a page?

I’ve found this tip:

" Use the javascript function “focus()” in the onload handler.
<body onload=“document.formName.textFieldName.focus();”> "

But i don’t know how use it into Scriptcase.

Anyone can help me?

Thanks

Re: input focus

Events/onInit:

sc_set_focus(‘field_name’);

Re: input focus

It doesn?t works, I have a 5.01 SC Version and in Events the only event with inits words are OnApplicationInit and OnScriptInit and the focus is not set to the field that I need.

sc_set_focus(‘nombre_cliente’);

Please tell me why doesn?t works!

Regards,

Eduardo Cazares

Re: input focus

Try the following:

Form, Javascript, Form.onLoad:

document.F1.field_name.focus();

Regards,
Scott.

Re: input focus

Hi,

i have a form with 4 block.
when I submit the form a javascript validate the form.
Can I set focus on a field who is in the second or third block???

thank you
massimo