Link to home
Start Free TrialLog in
Avatar of saleemkhan
saleemkhan

asked on

how can we hide frames for perticular users

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.

Avatar of sloeber
sloeber
Flag of Belgium image

Why don't you use two different framesets  ?
I
If it is user A open Frameset 1 else open Frameset 2.
This is the same result as you want.
Avatar of saleemkhan
saleemkhan

ASKER

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.
saleem.
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" )
Else
  Set uidoc = workspace.ComposeDocument( "", "request" )
End If

In your case you must not say "Set uidoc = workspace.ComposeDocument........" but
Call workspace.OpenPage("PageName")
ASKER CERTIFIED SOLUTION
Avatar of Jean Marie Geeraerts
Jean Marie Geeraerts
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks jerrith,
    i need the same help in future also.

saleem.
guys,

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

how about resizing the frame from code?