Solved

How to move the focus off a form?

Posted on 2003-11-13
20
251 Views
Last Modified: 2013-12-18
Hi Experts,

I'll try to explain the problem first.
Our database starts with a frameset, say Left and Right. In the Left frame, another Frameset is loaded with Frames LeftTop and LeftBottom. In LeftBottom, an outline with several views is shown to the user. When clicking an outline entry, the corresponding view is shown in the frame Right. When double-clicking a document, the document always opens in the Right frame (to be expected, isn't it ;-) Also, the F1-key for help is diverted to an application help file.

And now the LeftTop frame. We want to show a logo in that area. An end-user (application manager) should be able to set or change this logo without the use of the Domino Desiger. There are two approaches for this:
a. the user enters the logo in a document, and the application enters it into the Image Resources
b. the user enters it in a document, and the logo is displayed using a read-only form with a computed rich-text field.

For the first one, we'd need additional software, a no-go at the moment. The second one works, but... Sometimes the LeftTop frame gets the focus, so when a used types F1, he gets help in the logo form. I've been looking all over all properties, switched off everything that looks like setting the focus on the form, but I still can't succeed in getting the focus off or preventing the LeftTop-frame from getting the focus.

I even tried a hotspot around the logo, which works, but I can't find a call to give some other frame the focus. Trying in JavaScript proved no good, since window.top.frames[1].focus() gives an error message when there are only views on screen. Furthermore, focus() and blur() don't seem to work at all.

Big question: How to avoid getting the focus or how to set the focus to another frame?

I kind of know the answer ("sorry, no solution") so offering lots of points is more or less pointless. A direction of a solution will be awarded with the points mentioned.

Thnx for all your reactions!

Sjef

Btw this question is also on Notes.Net under http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedWeb/490974bd8d14261e85256ddb006eb485?OpenDocument
0
Comment
Question by:Sjef Bosman
20 Comments
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
I don't really see the issue. The only thing you are trying to do is prevent the help for the logo form from displaying.  Notes client obvisouly is giving you the default form help.  So, add a HelpRequest that does nothing.  Change the HelpRequest for that frm to:
CANCEL
or
"CANCEL"
or
NULL
or whatever else you want -- it will evaluate to a string that doesn't actually get used.

OK, well, what if you want the help to do something else... like activate whatever help would be appropriate for the main frame?  I think you could probably detect what is in that main frame, and just run the equivalent help.
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
FYI, R6 has more options to control focus.  Look at the main info tab for form properties.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Try specifying target for the logo frame as _blank or non-existent Frame name ?

~Hemanth
0
 
LVL 46

Author Comment

by:Sjef Bosman
Comment Utility
Detect what's in the main frame? Thought of that too. Unfortunately, ws.currentdocument gives me the current form, i.e. the form with the logo, and not the real frame. I could do some ugly tricks with environment variables or profile documents here, but I do prefer the "proper" solution.

I also tried to keep the focus in the Right frame, using source.GotoTop, but this call can only be executed in Edit-mode. Darn!
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
You can walk the frame hierarchy to see if a particular field exists in the right frame, which would at least allow you to detect if a particular form was open in edit mode.
0
 
LVL 46

Author Comment

by:Sjef Bosman
Comment Utility
The implemented Object Model in JavaScript in the Notes Client is too limited for this purpose, at least, I cannot find anywhere in the documentation how to walk the frames in LotusScript. I'd expect (from a proper implementation if framesets in LotusScript) to find a NotesUIFrameSet object in the NotesUIWorkspace object, with the necessary NotesUIFrameSet arrays going down to NotesUIDocuments that are being displayed. But it isn't there. Something for Notes R7 or R8?

Anyway, there are no fields on the LogoForm or on the form displayed in the Right frame, since both elements are displayed read-only. I want my Help-key to be fully functional in read-mode too. By the way, the name-field in JS is not filled in, so there is no way to find out what's there.

Maybe I'll write some C++ code to add the resource to the design, although this would add an unwanted DLL and portability problems to the application installation. I think I'll have to go back to the standard approach, using a Page and a fixed Picture. One more nice feature down the drain...
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
Hmm, how about this.  Instead of opening the view, have it open another frameset called ViewContainer, which will contain a hidden frame and a visisble frame.  The visible frame contains the view.  The hidden frame contains a dummy form with a single field on it.  Now, your logo frame can detect that the view is open.

The view will target its parent frame, so that when a document opens, the hidden fummy form goes away.

I believe you can also autoframe a form, not sure if that would open teh autoframe if a frameset is already open. The autoframe for the form could use a different frameset with a hidden framw ith a different editable dummy form, so that you can now detect that a document is open.

Now, how do you actually do the detection?  Good question.  It would seem you might need to do the detection in JavaScript.  At the ver least, the onFocus event can use JavaScript, and place focus in the dummy form.  The dummy form help request should do the same thing as its visisble framemate's help request is supposed to do.
0
 
LVL 46

Author Comment

by:Sjef Bosman
Comment Utility
Qwaletee,

Tried to do the detection with my hobby horse, a NotesTimer, with detrimental effects: Notes6.5 crashes every 3 minutes with it. I knew using the timer was a pain in the butt, and that using the same object every time might result in some trouble, but I wasn't exactly prepared to see such a lot of crashes etc. I'll try to keep this question open for some time, but I get more and more convinced that there is no solution.

Sjef :(
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 7

Expert Comment

by:BarryTice
Comment Utility
>> I also tried to keep the focus in the Right frame, using source.GotoTop,
>> but this call can only be executed in Edit-mode. Darn!

Can you get away with having the form open in edit mode, but with no editable fields?
0
 
LVL 46

Author Comment

by:Sjef Bosman
Comment Utility
If I remember well, I tried that at the time. This isn't going to work, because I want the focus to be in the Right frame, but it is the frame with the document in a form. If the document is open for read, then there is no way to call GotoTop.

I more or less left this part of the project :( I absolutely fail to see how Notes does cursor handling an focusing.

Thanks for the input. I'm afraid this question could be open for a long, long time, so I'll be closing it one of these days.
0
 
LVL 46

Author Comment

by:Sjef Bosman
Comment Utility
PAQ/refund?
0
 
LVL 46

Author Comment

by:Sjef Bosman
Comment Utility
Apparently there is no solution to the question: the focus cannot be moved programmatically. I'd love to split the points equally between the respondents, for their time and effort. I prefer a PAQ/Refund, though, it's the (politically) correct solution. The information could be valuable to someone else.

Okay?
0
 
LVL 46

Author Comment

by:Sjef Bosman
Comment Utility
I understand. I've tried to weigh very carefully all the suggestions given. There is no good answer amongst them, not even a bad one, so splitting is no good. The unwanted situation is still there, I just hope users don't start asking questions. Giving everybody 20 points just for their assistance isn't done as far as I know, so the only thing left is to ask for a Refund.

Sjef :-|
0
 
LVL 96

Expert Comment

by:Bob Learned
Comment Utility
I would ask for a refund.

Bob
0
 
LVL 46

Author Comment

by:Sjef Bosman
Comment Utility
I thought we already agreed on that? Sorry if I got things mixed up.

Please: PAQ/Refund?
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQed, with points refunded (150)

modulo
Community Support Moderator
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now