User Tools

Site Tools


en:wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:5.-onchange:start



ONCHANGE Node


This node describes the fields whose changes you want to monitor and the actions that you want them to execute when the changes occur.
When a change in value occurs in a property, the actions described are searched in the following way:

<onchange>
 
	<field name="campo">
 
		<action atributos>
			...
		</action> 
 
	</field> 
 
	<field name="campo"> 
 
		<action ....>
			...
		</action> 
 
	</field> 
 
	......
 
</onchange> 

Example of use


<onchange>
	<field name="MAP_HOMBRE">
		<action name="runscript">
			<script language="VBScript">
				if this("MAP_HOMBRE") = "1" then
					this("MAP_MUJER") = "0"
					this("SEXO") = "H"
				else
					if this("MAP_MUJER") = "0" then
						this("MAP_HOMBRE") = "1"
						this("SEXO") = 	"H"
					end if	
				end if
			</script>
		</action>
	</field>
	<field name="MAP_MUJER">
		<action name="runscript">
			<script language="VBScript">
				if this("MAP_MUJER") = "1" then
					this("MAP_HOMBRE") = "0"
					this("SEXO") = "M"
				else
					if this("MAP_HOMBRE") = "0" then
						this("MAP_MUJER") = "1"
					end if
				end if
			</script>
		</action>
	</field>
</onchange>
en/wiki/2.-desarrollo-app/2.3.-codigo/c.-eventos/5.-onchange/start.txt · Last modified: 2018/09/11 11:07 by ejetoro