Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2213

error en el tag obsValueField - error tag obsValueField

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Could
    • Resolution: Fixed
    • Affects Version/s: OpenMRS 1.8.0
    • Fix Version/s: OpenMRS 1.8.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      Implementando el Tag obsValueField, en una jsp pero me genera un error porque no esta definida la funcion $('numericRangeError'+conceptId);
      el mensaje de error es:

      Uncaught ReferenceError: $ is not defined
      validateNumericRangeevolutionN.form:479
      (anonymous function)evolutionN.form:252
      onblur

      Implements the Tag obsValueField, in a jsp, but it generates an error because the function is not defined $ ('numericRangeError' + concept);
      the error message is:

      Uncaught ReferenceError: $ is not defined
      validateNumericRangeevolutionN.form:479
      (anonymous function)evolutionN.form:252
      onblur

      La solucion fue
      1. Incluir el archivo engine.js "<openmrs:htmlInclude file="/dwr/engine.js" />"
      2. Cambiar la linea "$('numericRangeError'+conceptId);" por "document.getElementById('numericRangeError'+conceptId);" en el archivo "obsValueField.Tag".

      Estos cambios se realizron en el archivo obsValueField.Tag.

      The solution was:
      1. Include file engine.js --> "<openmrs:htmlInclude file="/dwr/engine.js" />"
      2. Change the line "$('numericRangeError'+conceptId);" by "document.getElementById('numericRangeError'+conceptId);"

      this was made in a file: obsValueField.Tag.

      Darius:
      The problem is that obsValueField.tag is expecting that you'll have included the dojo js library (which is no longer a given, from OpenMRS 1.8), and also that it forgets to include a dwr library. The fix is to use document.getElementById instead of relying on the dojo-defined $().

        Attachments

          Activity

            People

            • Assignee:
              darius Darius Jazayeri
              Reporter:
              gmario Mario Giraldo
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: