cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: Default names in modular DB Actions and Javascript.
Date Fri, 18 Oct 2002 12:10:40 GMT
Antonio Gallardo Rivera wrote:

>Does not work :-(
>
>The problem is that if I use (") then xml is invalid, my other option is use 
>('), but this create a string containing the name of the parameter and this 
>is not my intention to send to the function a string with the name of a 
><input> tag:
>
>"price.cost"
>
>I need a reference to the object <input> called "price.cost" and not its name.
>

Sander suggested you to modify function. Anyway, the idea is:

<select name="selectedPrice"
	onChange="return fill_value(myform['price.cost'], selectedPrice);">


Where myform is id of the form.


Vadim


>Anyway, this is a problem that Cocoon gurus must evaluate to make the change 
>of the current notation or not. I also know that the current notation is 
>correct and totally legal in the SQL world. As we can see sometimes the 
>worlds are not compatibles ;-D
>
>I will need to write another names of the fields into the database schema.xml 
>to make this.
>
>Anyway, many thanks for the help. :)
>
>Antonio Gallardo.
>
>El Jueves, 17 de Octubre de 2002 13:19, Sandor Szego escribió:
>  
>
>>I am not familiar with Modular Database Actions, but is it possible to do
>>the following:
>>
>><input value="" name="price.cost" type="hidden">
>>
>><select name="selectedPrice"
>>	onChange="return fill_value("price.cost", selectedPrice);">
>>  <option value=""> -- Select a Price  -- </option>
>>  <option value="$1.00|OnePrice"> This is a price</option>
>>  <option value="$1.00|AnotherPrice">Another Good Price</option>
>></select>
>>
>>(i.e. quote the name of the hidden field)
>>
>>function fill_value (fieldName,value) {
>>	var form = document.forms[0];
>>	var field = form[fieldName];
>>	field.value = value;
>>}
>>
>>Sandor
>>
>>-----Original Message-----
>>From: Antonio Gallardo Rivera [mailto:agallardo@agsoftware.dnsalias.com]
>>Sent: Thursday, October 17, 2002 12:14 PM
>>To: cocoon-dev@xml.apache.org
>>Subject: Default names in modular DB Actions and Javascript.
>>
>>
>>Hi,
>>
>>I am using Modular Database Actions. The default name of the fields of a
>>table
>>is defined:
>>
>>tableName.fieldName
>>
>>The problem is that this kind of parameters names in javascript is
>>interpreted
>>as
>>
>>Object.property.
>>
>>Then If we are trying to use Modular Databse Actions with javascript. This
>>will not work in his default parameters name. Its conflicting.
>>
>>Example:
>>
>>I need to fill the hidden paramter after a user select an option:
>>
>>The parameter is:
>><input value="" name="price.cost" type="hidden">
>>
>><select name="selectedPrice"
>>	onChange="return fill_value(price.cost, selectedPrice);">
>>  <option value=""> -- Select a Price  -- </option>
>>  <option value="$1.00|OnePrice"> This is a price</option>
>>  <option value="$1.00|AnotherPrice">Another Good Price</option>
>></select>
>>
>>
>>As you can see the onchange will not work on Javascript.
>>
>>Well, I know that I can change the defaults names to make it work, but can
>>be
>>better if we can choose a better syntaxis of the default names.
>>
>>I hope this example illustrate well the problem I am trying to show.
>>
>>Regards,
>>
>>Antonio Gallardo
>>    
>>




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message