________________________________
From: Мария Григорьева [mailto:[EMAIL PROTECTED]
Sent: maandag 25 augustus 2008 11:28
To: [email protected]
Subject: using fd:on-value-changed ???
Hello!!! I'm trying to update form data, using on-value-changed:
<fd:field id="density" required="true">
<fd:label>Плотность</fd:label>
<fd:datatype base="decimal"/>
<fd:on-value-changed>
<javascript>
var value = this.value;
var test =
cocoon.parameters["comp_id"];
var sql = "update
compositions set density = " + value + " where id = " + test;
dao.dbi.execute(sql);
</javascript>
</fd:on-value-changed>
</fd:field>
But as output I've got the exception:
java.sql.SQLException: ORA-00904: "UNDEFINED": invalid identifier
What's the problem ?
[Jasha Joachimsthal]
value is probably undefined. what do you see when you try to print its
value in the console. print('Value '+value);
Jasha Joachimsthal
www.onehippo.com <http://www.onehippo.com/>
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646