Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-612

There is a small bug in the ...\JSPWiki\templates\default\admin\UserManagement.jsp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.8.3
    • 2.8.4, 3.0
    • Templates and UI
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gfaz@163.com 高法正
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: