Unable to focus field on document open

When opening a document inside a frame it appears to be impossible to put the focus on the first field on the document.

I tried using the default focus propery of the field and setting the focus in Lotusscript or javascript in the PostOpen/onLoad event. All of them failed.

Any ideas?

Thanks in advance.

Subject: Unable to focus field on document open

Hello Dirk,

If you are experiencing no JS errors(which you didn’t mention) it might just be that focus is being taken away.

For symplicity, put in that pages onLoad even, document.forms[0].fieldName.focus(); if that doesn’t work, surround the focus() with alerts, to see if it’s even being called. On the second alert, you should be able to se the curors blinking, and identify if a later event is taking away the focus.

Example:

alert(‘before focus’);

document.forms[0].fieldName.focus();

alert(‘after focus’);

Hope this helps, and remember to reply.

Thomas Dietrich

Subject: please ignore

Subject: This worked for me…

In the ONLOAD event of the form… I put this:

//'this focuses the cursor in the first field on load

document.forms[0].MyName.focus()

(MyName is thename of the field)

Ruth