NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on March 18, 2010, 04:06:07 PM

Title: How do I set the curson on a field on a form when it opens?
Post by: kevin plummer on March 18, 2010, 04:06:07 PM
I want to conditionally set the cursor to a particular field on a form if the form is an Insert or a Update when the form updates.

I found this on the web but not sure if it works or how to convert to add to my app

<body onLoad="document.forms[0].fieldname.focus();">

Is there any other way to set on NTW5?

Cheers,

Kev
Title: Re: How do I set the curson on a field on a form when it opens?
Post by: Poul on March 19, 2010, 08:27:31 AM
in nettalk4 there is an embed "AfterSettingSelectField"

and add your own code

 p_web.SetValue('SelectField',clip(loc:formname) & '.PD:yourField')     !
Title: Re: How do I set the curson on a field on a form when it opens?
Post by: kevin plummer on March 19, 2010, 05:36:17 PM
Thanks Poul that worked a treat.
Title: Re: How do I set the curson on a field on a form when it opens?
Post by: kevin plummer on March 27, 2010, 12:59:31 AM
Any way to get it to to start in a field on a specific row in a EIP Browse embedded on a form?

Cheers,

Kevin
Title: Re: How do I set the curson on a field on a form when it opens?
Post by: Poul on March 29, 2010, 09:16:27 AM
i have not used EIP much, but i guess its the same as getting a browse correct - make sure your target row is first - has been my normal approach.

i suppose its possible - i would start by looking at what happens when you return to a browse from an update - a bunch of values know the way.

its either easy or one of those things that bruce calls 'non-trivial'
if you find the easy way, i'd be interested.

Title: Re: How do I set the curson on a field on a form when it opens?
Post by: kevin plummer on March 29, 2010, 05:52:51 PM
Good idea - I will try to add a lookup from the browse and see what happens.

Kev