Focus

Hello!

I have two forms. The “form1” has a buttom with the follow code (onclick):

window.open(db+‘Form2?OpenForm&Db=&View=Voces&Col=1’,‘VocesWeb’,‘status=no,resizable=yes,scrollbars=no,screenX=100,screenY=100,width=300,height=225’)

This action opens the “form2” to select multiple values.

The “form2” has a buttom “OK” with the follow code (onclick):

fieldName = window.name;

// eval evaluates a string of JavaScript code in the context of an object.

openerField = new Object( eval (‘opener.document.forms[0].’ + fieldName ) );

openerField.value = selectedItems(document.forms[0].Items);

window.close()

This action is working well, but I need that when the form2 is closed , the cursor goes to the field in the form1, where the selected values were loaded.

I tested the sentence .focus() , but it didn’t work.

Thank you!

Alicia

Subject: Focus

try putting the focus line in the onUnload event of window2.

window.opener.document.forms[0].sentence.focus()

Subject: RE: Focus

I tried it , but It didn’t work.

Thanks.