Focus on opening

Avatar

Avatar

SciMax

Avatar

SciMax

SciMax

27-05-2009

Is it possible to automatically focus on a specific field when a LiveCycle PDF is opened? 

If yes, what script or formcalc and event type should I use?   And last, where do I put the event on the hierarchy?

I tried to put the following script in the first subForm on the body page 1 level.  Please note the object I want to focus on is part of a fragment.

xfa.host.setFocus("DeptDiv.ddlCityDept");

But I was blocked from doing so.  I get this error message and the entire Script Editor window was greyed out.

"The script is not editable because the Script Editor contains script that is in a fragment."

Any assistance would be really appreciated.

Thanks.

View Entire Topic

Avatar

Avatar

SciMax

Avatar

SciMax

SciMax

28-05-2009

Thanks Paul. Your explanation does make sense. This is fantastic information in understanding HOW it works -- not just that it works (my level of understanding <grin>)!

I attempted to apply your suggested script but I'm still not able to place it into the Script Editor in what I think is the appropriate object. I get the same warning message about fragments.

I've attached the XDP since I'm not good at explaining myself. What I'm trying to do is have the focus automatically go to the first field -- Department name -- that filler needs to start at.

Please don't snicker too loud at some of my scripting (lol). I come from an extensive background in forms development and only recently gotten into actual coding.

Thanks. ….b