Subject: Re: [xsl] getting combo value,not textbox value From: himanshu padmanabhi <himanshu.padmanabhi@xxxxxxxxx> Date: Thu, 5 Mar 2009 17:28:01 +0530 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] getting combo value,not t, Ronan Klyne | Thread | RE: [xsl] getting combo value,not t, Michael Kay |
Re: [xsl] Grouping based on key res, Ganesh Babu N | Date | [xsl] xsl inside form element not w, himanshu padmanabhi |
Month |