PageRenderTime 16ms CodeModel.GetById 7ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

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