/Docs/07-Implementacion/Source/trunk/EDUAR_actual/EDUAR/EDUAR_UI/Scripts/General.js

http://blpm.googlecode.com/ · JavaScript · 37 lines · 29 code · 7 blank · 1 comment · 5 complexity · c9cecdeab83b2d744eaf85fa38ea0f25 MD5 · raw file

  1. function alerta() {
  2. alert("llegó");
  3. }
  4. function ValidarCaracteres(textareaControl, maxlength) {
  5. if (textareaControl.value.length > maxlength) {
  6. textareaControl.value = textareaControl.value.substring(0, maxlength);
  7. //alert("Debe ingresar hasta un maximo de " + maxlength + " caracteres");
  8. }
  9. }
  10. function DoChanges(sel1, sel2) {
  11. msg = document.getElementById(sel1).getAttribute('value');
  12. document.getElementById(sel2).setAttribute('value', msg);
  13. }
  14. function onChangeCicloLectivo(ddlCicloLectivo, ddlCurso) {
  15. var control = document.getElementById(ddlCicloLectivo)
  16. if (control.value <= 0) {
  17. SetSelectedIndex(ddlCurso, -1);
  18. document.getElementById(ddlCurso).disabled = true;
  19. }
  20. else
  21. document.getElementById(ddlCurso).disabled = false;
  22. }
  23. function SetSelectedIndex(dropdownlist, sVal) {
  24. var a = document.getElementById(dropdownlist);
  25. for (i = 0; i < a.length; i++) {
  26. if (a.options[i].value == sVal) {
  27. a.selectedIndex = i;
  28. }
  29. }
  30. }