Solved

How to move the focus off a form?

Posted on 2003-11-13
20
252 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
ID: 9739632
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
ID: 9739644
FYI, R6 has more options to control focus.  Look at the main info tab for form properties.
0
 
LVL 24

Expert Comment

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

~Hemanth
0
 
LVL 46

Author Comment

by:Sjef Bosman
ID: 9739882
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
ID: 9743400
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
ID: 9746065
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
ID: 9748743
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
ID: 10600629
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

Expert Comment

by:BarryTice
ID: 11287811
>> 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
ID: 11288052
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
ID: 12161689
PAQ/refund?
0
 
LVL 46

Author Comment

by:Sjef Bosman
ID: 12338804
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
ID: 12435274
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
ID: 12499307
I would ask for a refund.

Bob
0
 
LVL 46

Author Comment

by:Sjef Bosman
ID: 12502485
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
ID: 12537532
PAQed, with points refunded (150)

modulo
Community Support Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

15 Experts available now in Live!

Get 1:1 Help Now