on 09-02-2012 9:12 AM
Hello,
Need help on javascript.
Could someone please help me convert the below Form calc code into Javascript code
-> for Exit event of dropdown field ‘Positiongrade’
-> that has YES and NO values
-> to hide/visible the2 subforms ‘jobraising’ and ‘posforprom’ based on below FormCalc condition
if(data.Bodysubform.Promsel. Positiongrade == "Yes")
then
data.Bodysubform.jobraising.presence = "visible"
data.Bodysubform.posforprom.presence = "hidden"
endif
if(data.Bodysubform.Promsel. Positiongrade == "No")
then
data.Bodysubform.posforprom.presence = "visible"
data.Bodysubform.jobraising.presence = "hidden"
endif
I tested above FormCalc code and it works in other forms.
I cannot use the FormCalc script for this event because I already have generated code in javascipt which should not be modified.
So I need to use Javascript in this form.
Thanks much!
Hi,
Try this,
switch(xfa.event.newText)
{
case 'YES':
jobraising.presence = "invisible";
break;
case 'NO':
posforprom.presence = "hidden";
break;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi There,
I am facing problem in Dropdown lists in Subforms.
I want the region dropdown list values according to country (only for DE) dropdown list value. Both Dropdown lists are in a Subform.
For that, I have used this in EXIT event of Country Dropdown list:
if (this.rawValue == "DE Deutschland")
{
data.Item.IT_ITEM.DATA.ZZ_REGION.clearItems();
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Schleswig-Holstein","1");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Hamburg","2");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Niedersachsen","3);
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Bremen","4");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Nordrhein-Westfalen","5");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Hessen","6");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Rheinland-Pfalz","7");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Baden-Württemberg","8");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Bayern","9");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Saarland","10");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Berlin","11");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Brandenburg","12");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Mecklenburg-Vorpomme","13");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Sachsen","14");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Sachsen-Anhalt","15");
data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Thüringen","16");
}
else
{
data.Item.IT_ITEM.DATA.ZZ_REGION.clearItems();
}
It does only change first region dropdownlist value, not others because both dropdown lists are in a Subform.
Other problem is that it works only when All Country Dropdown lists are "DE". Means, first region dropdown list depends upon not only first country dropdown but also other dropdown.
My requirement is, If first country Dropdown is "DE", only first Region Dropdown list should be fill, not others. And so on.
Please provide solution that How can I change all dropdown lists of a Subform dynamically?
Waiting for reply.
Thank you
Chandler Bing
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.