cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are working to address an issue with subscription email notifications. In the meantime, be sure to check your favorite boards for new topics.

Have user login id appear in title bar of window - good for testing windchill as multiple users

ddemay
1-Newbie

Have user login id appear in title bar of window - good for testing windchill as multiple users

All -



Attached is some simple basic logic to have a userid appear as part of a
title bar in the browser. I personally have to test with multiple users
and will leave those browser windows open and switch back and forth. With
this running, I can have each window (when minimized on my desktop) show me
the user logged in through that browser window. i.e. Microsoft Windows will
take 5 or however many windows and collapse their task bar buttons into one
vertical list requiring you to click on multiple windows to figure out who
is who in what browser window.



I think testers will appreciate having this. This can be used on any JSP or
java environment. For 9.x the path to deploy this is:



codebase/netmarkets/jsp/util/



8.0 systems can use it also in begin.jsp or end.jsp or in some other way.





Regards,

David DeMay





*File contents below as plain text in case attachment doesn't work:



<script language="JavaScript" type="text/javascript">



var userLoggedOnTitleString = "<%=request.getRemoteUser()%>";



function addEvent(obj, eventType, funcToExec)

{

if (obj.addEventListener) {

obj.addEventListener(eventType,
funcToExec, false);

return true;

}

else if (obj.attachEvent)

{

return obj.attachEvent("on" + eventType,
funcToExec);

}

else

{

return false;

}

}





function updateTitleForUserLoggedOn()

{

if (userLoggedOnTitleString != null &&
userLoggedOnTitleString != ")

{

self.document.title =
userLoggedOnTitleString + " - " + self.document.title;

self.document.textContent =
userLoggedOnTitleString + " - " + self.document.textContent;

}

}



addEvent(self, 'load', updateTitleForUserLoggedOn);



</script>

0 REPLIES 0
Top Tags