Quantcast
Channel: Adobe Community : Discussion List - LiveCycle Forms
Viewing all articles
Browse latest Browse all 1160

Help with realization of a code by "change" event

$
0
0

The form is developed in Live Cycle 9

 

There is the following code:

var str = rawValue;

var FIO = str.split (' ');

var a = FIO.length

switch (a) {

case 2:{

        FIO [0] = FIO [0].charAt (0).toUpperCase () + FIO [0].substr (1);

        FIO [1] = FIO [1].charAt (0).toUpperCase () + FIO [1].substr (1);

    rawValue = FIO.join (' ');

          break;

}

     case 3:{

        FIO [0] = FIO [0].charAt (0).toUpperCase () + FIO [0].substr (1);

        FIO [1] = FIO [1].charAt (0).toUpperCase () + FIO [1].substr (1);

        FIO [2] = FIO [2].charAt (0).toUpperCase () + FIO [2].substr (1);

   rawValue = FIO.join (' ');

                break;

}

case 4:{

        FIO [0] = FIO [0].charAt (0).toUpperCase () + FIO [0].substr (1);

        FIO [1] = FIO [1].charAt (0).toUpperCase () + FIO [1].substr (1);

        FIO [2] = FIO [2].charAt (0).toUpperCase () + FIO [2].substr (1);

        FIO [3] = FIO [3].charAt (0) + FIO [3].substr (1);

    rawValue = FIO.join (' ');

           break;

}

  default:

    rawValue = str;  

   }

}

 

This code works on "exit" event (transfers the first symbols of the first three words to the top register, input of all text happens in the bottom register). How to make the given functionality on "change" event. It is necessary that at once at text input in the field the first symbols of the first those words were removed in the top register.


Viewing all articles
Browse latest Browse all 1160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>