Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.8.3
-
None
-
windows XP,IE6,IE7
Description
In the UserManagement.jsp page,there is a select box like that:
<select name="userid" id="userid" size="16" onchange="javascript:refreshUserInfo()">
<c:forEach var="user" items="${engine.userManager.userDatabase.wikiNames}">
<option><c:out value="${user.name}" escapeXml="true"/></option>
</c:forEach>
</select>
and the is a javascript function, it want to get the value of the select box. The function like that:
function refreshUserInfo()
{
var userid = $('userid').getValue();
if( userid == '-New-' ) return;
Wiki.jsonrpc("users.getUserInfo", [userid], function(userprofile)
{ $('loginname').value = userprofile.loginName; $('loginid').value = userprofile.loginName; $('fullname').value = userprofile.fullname; $('email').value = userprofile.email; $('lastmodified').setHTML(constructdate(userprofile.lastModified)); $('creationdate').setHTML(constructdate(userprofile.created)); });
}
In the option tag of the select box,there is not "value" attribute,so the code "$('userid').getValue()" get a empty String,
then it will occur a js bug.
But in the firefox3.5,the bug will not happen.
Chage the select box like that:
<select name="userid" id="userid" size="16" onchange="javascript:refreshUserInfo()">
<c:forEach var="user" items="${engine.userManager.userDatabase.wikiNames}">
<option value="${user.name}"><c:out value="${user.name}" escapeXml="true"/></option>
</c:forEach>
</select>
the bug gone.