We help IT Professionals succeed at work.

how can we hide frames for perticular users

saleemkhan asked
hai everybody,
i have two frames in the frameset.i want to hide the first frame and show the second frame for perticular users and
vice versa i want to hide the second frame and show the first frame for some other users.
how can we do this?
i tried like this to display a perticular page for a user and display other page for some users.
but i dont have any idea reg hiding frames.

@If(@IsMember("[Rolename]"; @UserRoles); "firstpage"; "secondpage")

can any body help me how to hide the frames.

waiting for reply.

Watch Question

Why don't you use two different framesets  ?

If it is user A open Frameset 1 else open Frameset 2.
This is the same result as you want.


i am using one frameset only.in that two frames.
if user A show frame1 else frame2.

how can we do this.

I dont think it's possible to hide a frame.
You can only change the frame content.
If it's user a show frame1 else show frame2.
Then you have only a frameset with one frame.
Why do you use then a frameset.
If you have only one frame it's not necessary to use a frameset.
Is this in Notes or Web ?


its on the web
If you define a frameset, then it is defined and only thing that you can do is change the content of the framse. So, I would recommend to follow sloeber soln.

Or you can write an agent which will create the page depending upon the user (role). You don't have to have frames for that, just a simple page is sufficient.

Which one would you prefer ?


i prefer of writing a agent depending on the user.how to do this.

any help.

waiting for reply.

This script creates a new document in the workspace. If the current user is a member of the Supervisor role in the database, the approval form is used to create the document; otherwise, the request form is used.

Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim uidoc As NotesUIDocument
Dim acl As NotesACL    
Dim entry As NotesACLEntry
Set db = session.CurrentDatabase
Set acl = db.ACL
Set entry = acl.GetEntry( session.CommonUserName )
If entry Is Nothing Then
  Set entry = acl.GetEntry( session.UserName )
End If
If entry Is Nothing Then
  Messagebox _
  "No entry for " & session.CommonUserName & _
  " or " & session.UserName,, "No entry"
  Exit Sub
End If
If entry.IsRoleEnabled( "[Supervisor]" ) Then
  Set uidoc = workspace.ComposeDocument( "", "approval" )
  Set uidoc = workspace.ComposeDocument( "", "request" )
End If

In your case you must not say "Set uidoc = workspace.ComposeDocument........" but
Call workspace.OpenPage("PageName")
Application Engineer
You can't hide frames in a frameset, you can show different content in the frames depending on the formula as you mention.
It all depends what you want to do, if it's only the content you are worried about, just display different pages depending on the roles.

If it's a different layout with a different number of frames all together, then you need to create framesets per user.
To select the correct frameset when the database is opened, create a blank page that you set in the launch properties of the database. (e.g. Start Page)
In the HTML Head of the page put a formula like this :
FrameSetToOpen:=@if(@IsMember("[Role]"; @UserRoles); "FramesetA"; "FramesetB");
"<META HTTP-EQUIV=" + @Char(34) + "Refresh" + @Char(34) + " CONTENT=" + @Char(34) + "0; URL=/" + @Subset(@DbName;-1) + "/" + FrameSetToOpen + "?OpenFrameSet" + @Char(34) + ">")

The first line will determin what frameset to open, the second line will automatically open the correct frameset by redirecting the page.


Thanks jerrith,
    i need the same help in future also.



what microsoft is doing with the TOC frame in the MSDN?

how about resizing the frame from code?

Explore More ContentExplore courses, solutions, and other research materials related to this topic.