sure, as a default I think there is a calendar pop up attached to all fields
of type date (correct me if I'm wrong)
In our project we have overwritten this behaviour in our
forms-samples-styling.xsl, so that a field of type date, gets translated
into a field which is attached to a javascript event which controls
behaviour of the pop up.
Here is our code from forms-samples-styling.xsl, this is basically a copy of
the code already provided modified to suit us. (Notice our javascript
function is named displayCalendar())
HTH,
Vica
___
<!-- Custom calendar styling -->
<!--+
| fi:field or fi:aggregatefield with either
| - explicit styling @type = 'date' or
| - implicit if no styling @type is specified,
| but datatype/@type = 'date' and datatype/convertor/@variant =
'date',
| selection lists must be excluded here
+-->
<xsl:template match="fi:field[fi:styling/@type='date'] |
fi:field[not(fi:styling/@type)][fi:[EMAIL PROTECTED]'date'][fi:convertor/@vari
ant='date']][not(fi:selection-list)] |
fi:aggregatefield[not(fi:styling/@type)][fi:[EMAIL PROTECTED]'date'][fi:conver
tor/@variant='date']][not(fi:selection-list)]" priority="100">
<xsl:variable name="id" select="generate-id()"/>
<xsl:variable name="format">
<xsl:choose>
<xsl:when test="fi:[EMAIL PROTECTED]'date']/fi:convertor/@pattern">
<xsl:value-of
select="fi:[EMAIL PROTECTED]'date']/fi:convertor/@pattern"/>
</xsl:when>
<xsl:otherwise>yyyy-MM-dd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- regular input -->
<input id="[EMAIL PROTECTED]" name="[EMAIL PROTECTED]" value="{fi:value}"
title="{normalize-space(fi:hint)}" type="text">
<xsl:apply-templates select="." mode="styling"/>
</input>
<!-- calendar popup -->
<xsl:choose>
<xsl:when test="@state = 'disabled'">
<!-- TODO: i18n key for @alt -->
<img src="images/cal.gif" style="border:0" alt="Calendar"/>
</xsl:when>
<xsl:otherwise>
<a name="[EMAIL PROTECTED]" id="[EMAIL PROTECTED]"
href="javascript:displayCalendar('[EMAIL PROTECTED]',
0, 0)"> <!-- TODO: i18n key for @alt -->
<img src="images/cal.gif" style="border:0" alt="Calendar"/>
</a>
</xsl:otherwise>
</xsl:choose>
<!-- common stuff -->
<xsl:apply-templates select="." mode="common"/>
</xsl:template>
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of matra
Sent: Friday, 5 May 2006 6:20 AM
To: [email protected]
Subject: cforms: wizard lookup (popup)
Hi,
In a cocoon form, how is it possible to mimic the functionality of date
fields/calendar-popups
i.e. have an img next to a field, when clicked, a new window will popup
containing some kind of a wizard (possibly another cocoon app). Uppon
submission (of the wizard) the calculated value should be sent back to the
field
for example, lets say that we have a zip-code field. and we like to offer
a popup wizard where the user will enter the street address
(in text or in an imagemap) and we will come up with the proper zip-code
TIA
-km
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Disclaimer: This email is confidential and may contain privileged information
for the sole use of the person or business to which it is addressed. If you are
not the intended recipient, please notify the sender by return e-mail or phone
as you must not view, disseminate, distribute or copy this email without our
consent. We do not accept any liability in connection with any computer virus,
data corruption, incompleteness, or unauthorised amendment of this email. It is
the sole responsibility of the receiver to scan for viruses before opening.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]