[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: "form.submit" not working

Subject: Re: "form.submit" not working
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 24 Feb 2009 13:22:07 +0100
Re:  "form.submit" not working
himanshu padmanabhi wrote:
This is "abc.xsl".one.cgi not getting called here.what can be the problem?
XML file is proper.other than submit,all else works well in xsl file.

<xsl:template match="one">
   <form name="form1" method="POST" action="one.cgi">
   <tr>
       <td>
           <xsl:value-of select="label"/>
       </td>
       <td>
           <xsl:value-of select="desc"/>
       </td>
       <td>
            <xsl:if test="label = 'Name'">
            <input type="text" name="Name" value="">
            </input>
            </xsl:if>
       </td>
   </tr>
   </form>
   <script>
       document.form1.submit();
   </script>
</xsl:template>

At least try to generate valid HTML with your stylesheet.


<xsl:template match="tracks">
  <form name="form1" method="POST" action="one.cgi">
   <table border="1">
       <tr>
           <td> Parameter </td>
           <td> Description </td>
           <td> Value </td>
       </tr>
       <xsl:apply-templates/>
   </table>
  </form>
  <script type="text/javascript">
  document.forms.form1.submit();
  </script>
</xsl:template>

<xsl:template match="one">

   <tr>
       <td>
           <xsl:value-of select="label"/>
       </td>
       <td>
           <xsl:value-of select="desc"/>
       </td>
       <td>
            <xsl:if test="label = 'Name'">
            <input type="text" name="Name" value=""/>
            </xsl:if>
       </td>
   </tr>
</xsl:template>

That has better chances of working.

--

	Martin Honnen
	http://JavaScript.FAQTs.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.