2 Replies Latest reply: Mar 8, 2012 9:13 AM by gimbal2 RSS

    problem doing childAppend

      Hi all
      I am adding the following script at the end of my JSP to add a hidden field but it dosent work unless i add an alert statment before appending the new element, dose anyone have any explanation of this strange behavior?

      String transactionNo =request.getParameter("transactionNo");
      System.out.println("PSS At error footer jsp -----" + transactionNo);
      <script language="JavaScript" type="text/javascript">
      var inputFeild = document.createElement("input");
      inputFeild.type = "hidden";
      inputFeild.name = "transactionNo";
      inputFeild.value = "<%=transactionNo%>";
      var formsCollection = document.getElementsByTagName('form');
      // i i add alert here, it works!!!!
      for(var i=0;i<formsCollection.length;i++){