Input field loses focus when editing the field

I am creating a document in the Notes Client, and the form has some input fields within it - coded in Passthru HTML/Javascript.

When I click on the input field and start typing, it only accepts the first character, and then the field loses focus to some other field on the form.

Does anybody know what is going on here?

P.S. I noticed a similar entry in these forums, but no replies were provided…

http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb/3d602d9fb114e26085256f8f006ba08b?OpenDocument

Subject: Input field loses focus when editing the field

Are there any events on the field in question present? E.g. input validation?

Subject: RE: Input field loses focus when editing the field

No, Charlie is right. This happens with plain vanilla fields, as soon as there are pass-through HTML and real fields. Tabbing or Shift-Tabbing from the Notes field to the pass-through field will keep this from happening.

However, I’m not too sure how useful it is to have those pass-through inputs on a form. The data isn’t stored in the document anyway, unless you add some code in onsubmit, that writes the content to one or more (hidden) real fields and additional code in onload to retrieve the values and put them into the pass-through fields again.

Edit:

And btw., events like onfocus, onblur or onchange are not executed for those HTML fields in the client. Been through that.

Subject: RE: Input field loses focus when editing the field

Hi Harkpabst Meliantrop,

I think the Tabbing or Shift-Tabbing does help a little bit. Obviously, I don’t want to have to go through and educate the users that they must Tab into the field. That’s not very user friendly nor intuitive.

And I was going to ask why I can’t get onfocus, onblur or onchange to work. Thanks for letting me know that you’ve had issues with this too.

The more I experiment with Passthru HTML on the Notes client, the more I realise I shouldn’t.

Subject: RE: Input field loses focus when editing the field

What you’re trying to do, I don’t think can be made to work using fields generated by passthru HTML.

What end-user requirement are you trying to fulfill by doing this? Perhaps someone can suggest an alternate way.

Subject: RE: Input field loses focus when editing the field

Hi Andre,

Actually, it works very well when I create some HTML Select fields. But it doesn’t work too well when I create some HTML Input fields.

Anyway, what I’m trying to do is to create a bunch of fields dynamically when the user composes a document; The dynamic fields will be based on some data that will be inherited from the selected document. For example, if the “quantity” on the selected document is 6, then when the user composes this new document, I need to create 6 fields to collect data from the user, and then store those 6 values into a multi-value field. (The populating of the multivalue field is done via an action button that contains Javascript.)

This all works well if the HTML fields are Select fields. And it works well for HTML Input fields too… except that the focus issue is a real user friendliness problem.

Subject: RE: Input field loses focus when editing the field

You’re still not describing the end-user requirement, but it sounds like what you probably want is a variable-length table that the user can enter with some assistance from you (i.e. some of the fields in the table might be non-editable, or keywords, or radio buttons, or numbers).

You might find this article useful: Betsy Thiede’s Dynamic Tables Article in The View – the article is not free for non-subscribers but the sample database can be downloaded by anyone.

The Domino Design Library Examples also contains sample code for editing tables of information, with a fairly detailed description of how to customize it.

  • Andre Guirard, IBM/Lotus Development

Useful blog: Best Practice Makes Perfect

For faster answers, be C R I S P Y