cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ivelin" <ive...@apache.org>
Subject Re: XMLForm & JavaScript incompatibility
Date Wed, 23 Apr 2003 03:01:26 GMT

Would it not work if you use the alternative JS syntax

form.field['/activityForm/DBdata/startDate'].value = "10/03/2003"



-=Ivelin=-
----- Original Message -----
From: "Yatin Shah" <nospam@kripa.com>
To: <cocoon-dev@xml.apache.org>
Sent: Tuesday, April 22, 2003 4:46 PM
Subject: XMLForm & JavaScript incompatibility


> JavaScript incompatibility results when using
> XMLForm with a xf:group option or when the
> ref argument refers to a name containing the slash character('/').
>
> This becomes an issue if one desires to use javascript features
> to access and manipulate the state of input fields.
> In the example below, '/activityForm/DBdata/startDate' is an
> invalid JavaScript name.[Although, it's a proper jxpath name!]
>
> Apurva zaveri [1] had a similar issue. Does anyone know
> how to get around this problem?
>
>
> SAMPLE XMLFORM code
> -------------------
>
> <xf:group ref="/activityForm/DBdata">
>     <xf:textbox ref="startTime">
>       <xf:caption>Start Time</xf:caption>
>       <xf:violations class="error"/>
>     </xf:textbox>
> </xf:group>
>
> Resulting HTML
> --------------
>
> <input name="/activityForm/DBdata/startDate" type="textbox"
value="2002-09-23">
>
>
> [1]:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&w=2&r=1&s=xmlform+JavaScrip
t&q=b
>
>
> --
> Yatin Shah, President                       mailto:ygs@kripa.com
> Kripa Inc.                                  http://www.kripa.com
> Dayton, New Jersey USA                      phone:  732.329.8303
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Developers of real time event driven distributed DB application
>


Mime
View raw message