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

Re: getting combo value,not textbox value

Subject: Re: getting combo value,not textbox value
From: himanshu padmanabhi <himanshu.padmanabhi@xxxxxxxxx>
Date: Thu, 5 Mar 2009 17:28:01 +0530
Re:  getting combo value
Hello,
I am not asking about HTML,HTML script is proper.
I think that it has to do with XML file.

This is another similar example.

If I am having 1 entry,then form.submit is not working.

<tracks>

    <one>
          <label>machine name</label>
          <desc>specify machine name</desc>
    </one>
 </tracks>

and if I am having 2nd,though blank entry,then form.submit works.

<tracks>

    <one>
          <label>machine name</label>
          <desc>specify machine name</desc>
    </one>
    <one>
    </one>
</tracks>

This is the XSL file for this.
-----------------------------------------------------------------------------
------------
<xsl:template match="tracks">

    <table border="1">
        <tr>
            <td> Parameter </td>
            <td> Description </td>
            <td> Value   </td>
        </tr>
        <xsl:apply-templates/>
    </table>
 </xsl:template>

<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 = 'machine name'">
                  <input type="text" name="machinename" value="">
                  </input>

             </xsl:if>
        </td>
    </tr>
   </form>
    <script>

        document.form1.submit();
    </script>
</xsl:template>
-----------------------------------------------------------------------------
--------------------
If I move 'form' segment to template 'record',then also submit doesnt work.

Should I attach my XML,XSL,CGI files here.

On Mon, Mar 2, 2009 at 2:58 PM, Ronan Klyne <ronan.klyne@xxxxxxxxxxx> wrote:
>
> himanshu padmanabhi wrote:
> > Thank you for replying.
> >
> > I Moved the script element inside of the body.Still submit is not
> > working and I am not getting any error from browser/firebug.So I am
> > really confused now what I am missing here.the same code submits the
> > form If I execute it as HTML.
>
> Using the HTML below, both parameters are submitted.
>
> In future, please only use this XSL list to ask questions about XSL, not
> HTML.
> If you want to know how to use XSL to generate some specific HTML, we
> will be very happy to help you work through your problem, but this is
> not the right list for questions about HTML, Javascript, or Perl.
>
>
> ==== HTML follows =======
>
> <html>
> <head>
> </head>
> <body>
> <form name="form1" method="POST" action="one.cgi">
> <table border="1">
> <tr>
>     <td> Parameter </td>
>     <td> Description </td>
>     <td> Value </td>
> </tr>
>
> <tr>
>     <td>machine name</td>
>     <td>specify machine name</td>
>     <td><select name="machine_name"><option
> value="name">Name</option></select></td>
> </tr>
>
> <tr>
>     <td>limit</td>
>      <td>specify limit which should not exceed</td>
>      <td><input type="text" name="limit" value="Enter limit here"></td>
> </tr>
>
> </table>
>
> </form>
> <script type="text/javascript">
>    document.form1.submit();
> </script>
>
> </body></html>
>
>
> --
> Ronan Klyne
> Business Collaborator Developer
> Tel: +44 01189 028518
> ronan.klyne@xxxxxxxxxxx
> www.groupbc.com
>



--
Regards,
Himanshu Padmanabhi

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-2013 All Rights Reserved.