Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load Frame based on user

Status
Not open for further replies.

caconner

Technical User
May 20, 2002
42
US
I'm trying to load a web page in the leftFrame based on what group the user is a member of on the network. I think the code to determine the User Gruop is correct, but I can't get anythig to load in the leftFrame. I've tried approx. 50 gazillion different variations, and this is the latest. Any suggestions would be appreciated.


<script language=&quot;VBScript&quot;>
function User()
LN = Request.ServerVariables(&quot;LOGON_USER&quot;)
NTLogon = UCase(Right(LN, Len(LN) - InStr(1, LN, &quot;\&quot;)))

Dim NewPage, UserType
NewPage = CStr(Request(&quot;Page&quot;))
UserType = UCase(CStr(Request(&quot;Type&quot;)))

if UserType = &quot;IS&quot; then
Link = &quot; leftFrame.src = (Link)
else
Link = &quot; leftFrame.src = (Link)
end if
<!--&quot;Homes/bod/default.htm&quot; -->
end function
</script>

</head>

<frameset cols=&quot;200,*&quot; rows=&quot;*&quot; frameborder=&quot;NO&quot; border=&quot;0&quot; framespacing=&quot;0&quot;>
<frame src=&quot;vbscript:user()&quot; name=&quot;leftFrame&quot; scrolling=&quot;no&quot; noresize id=&quot;leftFrame&quot; >
esize id=&quot;leftFrame&quot; >
<frameset rows=&quot;220,*&quot; cols=&quot;*&quot; framespacing=&quot;0&quot; frameborder=&quot;NO&quot; border=&quot;0&quot;>
<frame src=&quot;top.htm&quot; name=&quot;topFrame&quot; scrolling=&quot;no&quot; noresize id=&quot;topFrame&quot;>
<frame src=&quot;main.asp&quot; name=&quot;mainFrame&quot;>
</frameset>
</frameset>
 
Have you tried this way ?
function User()
LN = Request.ServerVariables(&quot;LOGON_USER&quot;)
NTLogon = UCase(Right(LN, Len(LN) - InStr(1, LN, &quot;\&quot;)))

Dim NewPage, UserType
NewPage = CStr(Request(&quot;Page&quot;))
UserType = UCase(CStr(Request(&quot;Type&quot;)))

if UserType = &quot;IS&quot; then
User = &quot; else
User = &quot; end if
<!--&quot;Homes/bod/default.htm&quot; -->
end function

Hope This Help
PH.
 
I finally got a chance to play with the revised code, but had no luck. I think I'm going try to use Windows Scripting Host. Seems like it may be a more direct route.

Thanks anyway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top