|
Subject: Re: [xsl] "form.submit" not working From: himanshu padmanabhi <himanshu.padmanabhi@xxxxxxxxx> Date: Tue, 24 Feb 2009 18:44:03 +0530 |
This is my one.cgi which should be called on xsl submit
#!/usr/bin/perl
require '../abc/abc-lib.pl';
&ReadParse();
use Data::Dumper;
#I could not use header because of 'redirect' function below.so
testing putting $in hash in temp.file
open(FH,"> /usr/tempfile");
print FH Dumper($in);
close(FH);
&redirect("edit_service.cgi?idx=$in{'idx'}&new=$in{'new'}&sidx=$in{'sidx'}&fl
ag=1&monitor=$in{'monitor'}");
HTML elements gets printed correctly in my given code also and submit
code given by Mr. Martin not worked(sorry,maybe I did something
wrong)..:((
Don't know what I am doing wrong here. Things are so straight forward
actually.
did form.submit using similar script already.but this is troubling a lot.
On Tue, Feb 24, 2009 at 5:52 PM, Martin Honnen <Martin.Honnen@xxxxxx> wrote:
> 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/
>
>
--
Regards,
Himanshu Padmanabhi
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] "form.submit" not working, Martin Honnen | Thread | Re: [xsl] "form.submit" not working, Martin Honnen |
| Re: [xsl] "form.submit" not working, Martin Honnen | Date | [xsl] If no parameters,then what sh, himanshu padmanabhi |
| Month |