0 Replies Latest reply on Jul 1, 2009 7:34 PM by dell

    Javascript not working

    dell

      Title

      Javascript not working

      Your post

      Hi all, I would like the following script to be called when a button is clicked. However, the result I'm after does not appear after clicking it. Can someone please help? All I want to do is submit this form to another page. Thank you.

       

        <!--Script-->             

                         <script type="text/javascript">
                              <xsl:comment>
                                  <![CDATA[
                                      function submitForm()    {
                                              document.refQuery.action = "/fmi/xsl/bradd/bauxite origin/recordlist.xsl";
                                              document.refQuery.submit()
                                      }
                                  ]]>
                              </xsl:comment>
                          </script>

       

       

       <!-page body-->

                                             <td align="left">
                                                  <xsl:for-each select="fmrs:field[@name='BauxGrade Ref']/fmrs:data">
                                                      <xsl:if test="position() != 1"><br/></xsl:if>
                                                         <xsl:value-of select="."/>
                                                      <!--
                                                      <xsl:attribute name="href">
                                                          <xsl:text disable-output-escaping="yes">/fmi/xsl/bradd/bauxite origin/recordlist.xsl</xsl:text>
                                                      </xsl:attribute>
                                                      -->
                                                      <xsl:if test=". != ''">
                                                          <div style="visibility:hidden;">
                                                             <form method="post" name="refQuery">
                                                              <xsl:attribute name="action">/fmi/xsl/bradd/reference/recordlist.xsl</xsl:attribute>
                                                              <input>
                                                                  <xsl:attribute name="type">hidden</xsl:attribute>
                                                                  <xsl:attribute name="name">-lay</xsl:attribute>
                                                                  <xsl:attribute name="value">Reference</xsl:attribute>
                                                              </input>                                                      
                                                              <select>
                                                                  <xsl:attribute name="name">RefCode.op</xsl:attribute>
                                                                  <option selected="selected" value="cn">Contains</option>
                                                              </select>
                                                              <input>
                                                                  <xsl:attribute name="type">hidden</xsl:attribute>
                                                                  <xsl:attribute name="name">RefCode</xsl:attribute>
                                                                  <xsl:attribute name="value">
                                                                      <xsl:value-of select="."/>
                                                                  </xsl:attribute>
                                                                 
                                                                 </input>
                                                              <input checked="checked" name="-lop" type="radio" value="and"/>
                                                          </form>
                                                          </div>
                                                              <input type="button" value="submit" name="-find" onclick="submitForm()">
                                                                  <xsl:attribute name="type">Submit</xsl:attribute>
                                                                  <xsl:attribute name="value">Submit</xsl:attribute>
                                                              </input>
                                                      </xsl:if>
                                                  </xsl:for-each>
                                              </td>