cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasha Joachimsthal" <j.joachimst...@onehippo.com>
Subject RE: using fd:on-value-changed ???
Date Mon, 25 Aug 2008 09:35:15 GMT
 

________________________________

	From: Мария Григорьева [mailto:magsend@gmail.com] 
	Sent: maandag 25 augustus 2008 11:28
	To: users@cocoon.apache.org
	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



Mime
View raw message