Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3479

Javascript not working in sx:div

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.1.8.1
    • None
    • Plugin - Dojo Tags
    • None
    • In Tomcat 6

    • Patch, Important

    Description

      Hi,
      Please help me in the following issue.
      The issue in Javascript is not working in the included page in sx:div. Below is the code
      In certification.jsp if I click on Edit link it is not calling the javascript function editCertification()
      I am using struts2-dojo-plugin-2.1.8.1.jar
      struts2-core-2.1.8.1.jar

      welcome.jsp
      ------------------
      <sx:div id="two" label="Tab 2" href="certificationLink.action" preload="false" executeScripts="true" separateScripts="false"> </sx:div>

      struts.xml
      --------------
      <action name="certificationLink" class="com.lnt.pms.action.AddDeleteCertificationAction"> <result name="success" >/pages/certification.jsp</result> </action>

      certification.jsp
      ---------------------
      <script>
      function editCertification(userCertificationId){
      var url = "editCertification.action?certificationId="+userCertificationId;
      var myAjax = new Ajax.Request(
      url,

      { method: 'post', onComplete: fetchSuccess }

      }
      function fetchSuccess(originalRequest){
      var result = originalRequest.responseText.evalJSON();
      document.getElementById("certificationName").value=result.certificationList[0].certificationName;
      }
      </script>

      <td class="nowrap"><s:set id="userCertificationId" value="userCertificationId" />
      <s:a href="javascript:editCertification('%

      {userCertificationId}

      ')" theme="xhtml">Edit</s:a>
      </td>

      Attachments

        Activity

          People

            Unassigned Unassigned
            sudhir007 Sudhir Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 72h
                72h
                Remaining:
                Remaining Estimate - 72h
                72h
                Logged:
                Time Spent - Not Specified
                Not Specified