Hi
I've been trying to get Perform to use an clickable image to submit a
form. So far no luck with
<form:form name="myform">
<form:submit name="button" value="A Button"/>
<form:submit name="image" image="...some image..."/>
</form:form>
Which works fine for the button, but not the image. Anyone know why?
Would really appreciate any help. Gory details below.
Thanks
Andy
I added the following to perform_html.xsl:
<xsl:template match="image_button">
<input
type="image"
name="[EMAIL PROTECTED]|[EMAIL PROTECTED]|index}"
align="[EMAIL PROTECTED]|align}"
src="[EMAIL PROTECTED]|src}"
border="[EMAIL PROTECTED]|border}">
<xsl:if test="@disabled or disabled"><xsl:attribute
name="disabled">disabled</xsl:attribute></xsl:if>
<xsl:if test="@onclick or onclick">
<xsl:attribute name="onclick"><xsl:value-of
select="@onclick|onclick"/></xsl:attribute>
</xsl:if>
</input>
<xsl:apply-templates select="error"/>
</xsl:template>
So I have tststudy.xsp:
<?xml version="1.0"?>
<xsp:page
language="Perl"
xmlns:xsp="http://apache.org/xsp/core/v1"
xmlns:form="http://axkit.org/NS/xsp/perform/v1"
xmlns:param="http://axkit.org/NS/xsp/param/v1"
>
<xsp:logic>
sub submit_button {
my ($ctxt, $index) = @_;
return "teststudy.xsp?action=submit_button";
}
sub submit_image {
my ($ctxt, $index) = @_;
return "teststudy.xsp?action=submit_image";
}
</xsp:logic>
<html>
<body>
<h1>Perform test</h1>
<form:form name="myform">
<form:submit name="button" value="A Button"/>
<form:submit name="image" image="images/CRL/PRC6.png"/>
</form:form>
<xsp:logic>
if (<param:action/> eq "submit_button") {
<p>Submitted via button</p>
}
if (<param:action/> eq "submit_image") {
<p>Submitted via image</p>
}
</xsp:logic>
</body>
</html>
</xsp:page>
and apache config
<Files teststudy.xsp>
AxResetProcessors
AxAddProcessor application/x-xsp null
AxAddProcessor text/xsl /xsl/perform_pipeline.xsl
</Files>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]