News

LiveField cursor

Posted by Craig on 13 November 2008

The reason you can't use Goto Object right after Goto Layout is to do with the asynchronous nature of the web viewer - that is to say it loads in it's own good time which is typically a fraction of a second after FileMaker has drawn the layout. Therefore although Goto Object command does put focus on the web viewer it can't put the cursor into a field within that if that field hasn't been rendered yet.

So we have very cunningly devised a way around this: you can specify a script as an additional parameter, e.g.

LiveField( "Home::Filter Entry" ; "enabled" ; "White" ; "Goto LiveField" )

Given this extra parameter, the LiveField control will call that FileMaker script, once it has loaded (actually, in the JavaScript onload event). Your script should simply say Goto Object(webViewerObjectName).

That's all there is to it... to reiterate - this is an additional parameter over and above the params we show in the function syntax - you just add on 1 more parameter and inside quotes specify the script name.

We show this technique in the demo file, under Basic Controls, LiveField.

Post Comment

Please login to post a comment.

Comments

No comments have been posted.