son los menu list que estoy haciendo trabaja del 1al 3 pero el 4 no.. este es el codigo: de añadir....
<?
if($_POST['fullyear']!=1)
{
print("<h1>Add New Class</h1>
<script src='materias.js' type='text/javascript'></script>
<form name='addclass'action='./index.php' method='POST'>
<br><br><br>
<table cellspacing='0' cellpadding='5' class='dynamiclist' align='center' width='800'>
<tr class='header'>
<th>Class Name</th>
<th>Teacher</th>
<th>Semester</th>
<th>Section Number</th>
<th>Room Number</th>
<th>Period Number</th>
<th>combo1</th>
<th>combo2</th>
<th>combo3</th>
<th>combo4</th>
<th>Substitute</th>
</tr>
<tr class='even'>
<td><input type='text' name='title' maxlength='20' /></td>
<td><select name='teacher'>");
// print out the list of teachers for the drop-down box //
$query = mysql_query("SELECT teacherid,fname,lname,userid FROM teachers")
or die("AddClass.php: Unable to get list of teachers - ".mysql_error());
while( $teacher = mysql_fetch_row($query) )
{
$q = mysql_query("SELECT type FROM users WHERE userid = '$teacher[3]'");
$type = mysql_result($q,0);
if($type == "Teacher")
print("<option value='$teacher[0]'>$teacher[1] $teacher[2]</option>\n");
}
print("</select>
</td>
<td><select name='semester'>");
// print out the list of semesters for the drop-down box //
$query = mysql_query("SELECT semesterid, title FROM semesters")
or die("AddClass.php: Unable to get list of semesters - ".mysql_error());
while( $semester = mysql_fetch_row($query) )
{
print("<option value='$semester[0]'>$semester[1]</option>\n");
}
print("</select></td>
<td><input type='text' name='sectionnum' maxlength='15' size='6' /></td>
<td><input type='text' name='roomnum' maxlength='4' size='6' /></td>
<td><input type='text' name='periodnum' maxlength='2' size='6' /></td>
<td>
<select name='combo1' onchange=fillSelect(this.value,this.form['combo2'])>
<option selected='selected'>Selecciona una Licenciatura</option>
</select></td>
<td>
<select name='combo2' onchange=fillSelect(this.value,this.form['combo3'])>
<option selected='selected'>Selecciona una Asignatura</option>
</select></td>
<td><select name='combo6' onchange="fillSelect(this.value," this.form[="this.form["'combo4'])>
<option selected='selected'>Selecciona una Clave</option>
</select>
<td><select name='combo5' onchange=getValue(this.value,this.form['combo2'].value,this.form['Ccombo1'].value)>
<option selected='selected'>Selecciona un Horario</option>
</select>
<td>
<select name='combo4' onchange=getValue(this.value,this.form['combo3'].value,this.form['combo2'].value,this.form['Ccombo1'].value)>
<option selected='selected'>Selecciona un Horario</option>
</select></td>
<select name=substitute>");
// print out the list of substitutes for the drop-down box //
$query = mysql_query("SELECT teacherid,fname,lname,userid FROM teachers")
or die("AddClass.php: Unable to get list of substitutes - ".mysql_error());
while( $teacher = mysql_fetch_row($query) )
{
$q = mysql_query("SELECT type FROM users WHERE userid = '$teacher[3]'");
$type = mysql_result($q,0);
if($type == "Substitute")
print("<option value='$teacher[0]'>$teacher[1] $teacher[2]</option>\n");
}
print(" </select>
</td>
</tr>
</table>
<br />
<table cellpadding='0' border='0' align='center' width='800'>
<tr>
<td>
<b>Days of the Week:</b>
<br />
<input type='checkbox' value='M' name='Days[]' /> Monday<br />
<input type='checkbox' value='T' name='Days[]' /> Tuesday<br />
<input type='checkbox' value='W' name='Days[]' /> Wednesday<br />
<input type='checkbox' value='H' name='Days[]' /> Thursday<br />
<input type='checkbox' value='F' name='Days[]' /> Friday
<br /><br />
<input type='button' value='Add Class' onClick='document.addclass.addclass.value=1;document.addclass.page2.value=0;document.addclass.submit();'>
<input type='button' value='Full Year' onClick='document.addclass.fullyear.value=1;document.addclass.page2.value=9;document.addclass.submit();'>
<input type='button' value='Cancel' onClick='document.addclass.page2.value=0;document.addclass.submit();'></td>
</tr>
</table>
<input type='hidden' name='addclass' value='' />
<input type='hidden' name='fullyear' />
<input type='hidden' name='page2' value='$page2' />
<input type='hidden' name='logout' />
<input type='hidden' name='page' value='$page' />
</form>
<table width='520' border=0 cellspacing=0 cellpadding=0 height=1>
<tr>
<td valign='top'>
</td>
</tr>
</table>
");
}
else
{
print("<h1>Add New Class</h1>
<form name='addclass'action='./index.php' method='POST'>
<br><br><br>
<table cellspacing='0' cellpadding='5' class='dynamiclist' align='center' width='800'>
<tr class='header'>
<th>Class Name</th>
<th>Teacher</th>
<th>First Semester</th>
<th>Second Semester</th>
<th>Section Number</th>
<th>Room Number</th>
<th>Period Number</th>
<th>combo1</th>
<th>combo2</th>
<th>combo3</th>
<th>combo4</th>
<th>Substitute</th>
</tr>
<tr class='even'>
<td><input type='text' name='title' maxlength='20' /></td>
<td><select name='teacher'>");
// print out the list of teachers for the drop-down box //
$query = mysql_query("SELECT teacherid,fname,lname,userid FROM teachers")
or die("AddClass.php: Unable to get list of teachers - ".mysql_error());
while( $teacher = mysql_fetch_row($query) )
{
$q = mysql_query("SELECT type FROM users WHERE userid = '$teacher[3]'");
$type = mysql_result($q,0);
if($type == "Teacher")
print("<option value='$teacher[0]'>$teacher[1] $teacher[2]</option>\n");
}
print("</select>
</td>
<td><select name='semester'>");
// print out the list of semesters for the drop-down box //
$query = mysql_query("SELECT semesterid, title FROM semesters")
or die("AddClass.php: Unable to get list of semesters - ".mysql_error());
while( $semester = mysql_fetch_row($query) )
{
print("<option value='$semester[0]'>$semester[1]</option>\n");
}
print("</select></td>
<td><select name='semester2'>");
// print out the list of semesters for the drop-down box //
$query = mysql_query("SELECT semesterid, title FROM semesters")
or die("AddClass.php: Unable to get list of semesters - ".mysql_error());
while( $semester = mysql_fetch_row($query) )
{
print("<option value='$semester[0]'>$semester[1]</option>\n");
}
print("</select></td>
<td><input type='text' name='sectionnum' maxlength='15' size='6' /></td>
<td><input type='text' name='roomnum' maxlength='4' size='6' /></td>
<td><input type='text' name='periodnum' maxlength='2' size='6' /></td>
<td>
<select name='combo1'onchange=fillSelect(this.value,this.form['combo2'])>
<option selected='selected'>Selecciona una Licenciatura</option>
</select></td>
<td>
<select name='combo2' onchange=fillSelect(this.value,this.form['combo3'])>
<option selected='selected'>Selecciona una Asignatura</option>
</select></td>
<td >
<select name='combo3' onchange=fillSelect(this.value, this.form['combo4'])>
<option selected='selected'>Selecciona una Clave</option>
</select></td>
<td>
<select name='combo4' onchange=getValue(this.value,this.form['combo3'].value,this.form['combo2'].value,this.form['Ccombo1'].value)>
<option selected='selected'>Selecciona un Horario</option>
</select></td>
<td><select name='substitute'>");
// print out the list of substitutes for the drop-down box //
$query = mysql_query("SELECT teacherid,fname,lname,userid FROM teachers")
or die("AddClass.php: Unable to get list of substitutes - ".mysql_error());
while( $teacher = mysql_fetch_row($query) )
{
$q = mysql_query("SELECT type FROM users WHERE userid = '$teacher[3]'");
$type = mysql_result($q,0);
if($type == "Substitute")
print("<option value='$teacher[0]'>$teacher[1] $teacher[2]</option>\n");
}
print(" </select>
</td>
</tr>
</table>
<br />
<table cellpadding='0' border='0' align='center' width='880'>
<tr>
<td>
<b>Days of the Week:</b>
<br />
<input type='checkbox' value='M' name='Days[]' /> Monday<br />
<input type='checkbox' value='T' name='Days[]' /> Tuesday<br />
<input type='checkbox' value='W' name='Days[]' /> Wednesday<br />
<input type='checkbox' value='H' name='Days[]' /> Thursday<br />
<input type='checkbox' value='F' name='Days[]' /> Friday
<br /><br />
<input type='button' value='Add Class' onClick='document.addclass.addclass.value=1;document.addclass.page2.value=0;document.addclass.submit();'>
<input type='button' value='Full Year' onClick='document.addclass.fullyear.value=1;document.addclass.page2.value=9;document.addclass.submit();'>
<input type='button' value='Cancel' onClick='document.addclass.page2.value=0;document.addclass.submit();'></td>
</tr>
</table>
<input type='hidden' name='addclass' value='' />
<input type='hidden' name='fullyear' value='$_POST[fullyear]' />
<input type='hidden' name='page2' value='$page2' />
<input type='hidden' name='logout' />
<input type='hidden' name='page' value='$page' />
</form>
<table width='520' border=0 cellspacing=0 cellpadding=0 height=1>
<tr>
<td valign='top'>
</td>
</tr>
</table>
");
}
?>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Este es el codigo donde enseña despues de de añadir:
////////////////////////////////////////////////////////////////////////////////////
<?
###############
# ADD #
###############
// Add the new class if one is being added //
if($_POST["addclass"] == 1 && $_POST["title"] != "" && $_POST["teacher"] != "" && $_POST["semester"] != "" && $_POST["roomnum"] != "" && $_POST["periodnum"] != "" && $_POST["combo1"] != "" && $_POST["combo2"] != "" && $_POST["combo3"] != "" && $_POST["combo4"] != "")
{
if($_POST['fullyear']!=1)
{ $dotw = '';
// Combine the days of the week to be entered into the database //
$days = $_POST["Days"];
for($i=0; $i<sizeof($days); $i++)
{
$dotw .= $days[$i];
}
// Get the termid for insertion of the class //
$query = mysql_query('SELECT termid FROM semesters WHERE semesterid = '.$_POST["semester"]);
$termid = @mysql_result($query,0);
$query = mysql_query("INSERT INTO courses VALUES('', '$_POST[semester]', '$termid', '$_POST[title]', '$_POST[teacher]', '$_POST[sectionnum]', '$_POST[roomnum]', '$_POST[periodnum]', '$_POST[combo1]', '$_POST[combo2]', '$_POST[combo3]', '$_POST[combo4]','','','','','','','','','$dotw','$_POST[substitute]','')")
or die("ManageClasses.php: Unable to insert new class - " . mysql_error());
}
else
{
// Make sure they haven't selected the same id for both semesters //
if ($_POST['semester']!=$_POST['semester2'])
{
// Combine the days of the week to be entered into the database //
$days = $_POST["Days"];
for($i=0; $i<sizeof($days); $i++)
{
$dotw .= $days[$i];
}
// Insert the class for the first semester //
$query = mysql_query("INSERT INTO courses VALUES('', '$_POST[semester]', '$termid', '$_POST[title]', '$_POST[teacher]', '$_POST[sectionnum]', '$_POST[roomnum]', '$_POST[periodnum]', '$_POST[combo1]', '$_POST[combo2]', '$_POST[combo3]', '$_POST[combo4]','','','','','','','','','$dotw','$_POST[substitute]', '')")
or die("ManageClasses.php: Unable to insert new class - " . mysql_error());
// Get it's ID //
$course1 = mysql_insert_id();
// Insert the class for the second semester //
$query = mysql_query("INSERT INTO courses VALUES('', '$_POST[semester2]', '$termid', '$_POST[title]', '$_POST[teacher]', '$_POST[sectionnum]', '$_POST[roomnum]', '$_POST[periodnum]', '$_POST[combo1]', '$_POST[combo2]', '$_POST[combo3]', $_POST[combo4]','','','','','','','','','$dotw','$_POST[substitute]', '')")
or die("ManageClasses.php: Unable to insert new class - " . mysql_error());
// Get it's ID //
$course2 = mysql_insert_id();
// Update the classes so that they'll know about each other //
$query = mysql_query("UPDATE courses SET secondcourseid = $course2 WHERE courseid = $course1");
$query = mysql_query("UPDATE courses SET secondcourseid = $course1 WHERE courseid = $course2");
}
}
}
##############
# EDIT #
##############
// Edit the class if one is being edited //
if($_POST["editclass"] == 1 && $_POST["title"] != "" && $_POST["teacher"] != "" && $_POST["semester"] != "" && $_POST["roomnum"] != "" && $_POST["periodnum"] != "" && $_POST["combo1"] != "" && $_POST["combo2"] != "" && $_POST["combo3"] != "" && $_POST["combo4"] != "")
{
// Combine the days of the week to be entered into the database //
$days = $_POST["Days"];
for($i=0; $i<sizeof($days); $i++)
{
$dotw .= $days[$i];
}
$query = mysql_query("UPDATE `courses` SET `coursename`='$_POST[title]', `teacherid`='$_POST[teacher]', `semesterid`='$_POST[semester]', `sectionnum`='$_POST[sectionnum]', `roomnum`='$_POST[roomnum]', `periodnum`='$_POST[periodnum]', `combo1`='$_POST[combo1]', `combo2`='$_POST[combo2]', `combo3`='$_POST[combo3]', `combo4`='$_POST[combo4]', `dotw`='$dotw', `substituteid`='$_POST[substitute]' WHERE `courseid`='$_POST[courseid]' LIMIT 1")
or die("ManageClasses.php: Unable to update the class information - ".mysql_error());
}
##############
# DELETE #
##############
// Delete the classess that the user has requested as well as the classes belonging to those classess //
if($_POST["deleteclass"] == 1)
{
require_once("DeleteFunctions.php");
$delete = $_POST["delete"];
for($i=0; $i<sizeof($delete); $i++)
{
$query = mysql_query("SELECT secondcourseid FROM courses WHERE courseid = $delete[$i]");
$secondclass = mysql_fetch_row($query);
deleteCourse($delete[$i]);
deleteCourse($secondclass[0]);
}
}
print("<script language='JavaScript'>
// Function to make sure the user wants to delete the class(es) //
function validate()
{
if( document.classes.selectclass.value > 0 )
{
var confirmed = confirm(\"Deleteing a class will also delete the class bulletins, tardies, attendance, assignments, and registrations that occured during that class. \\n \\nAre you sure?\");
if( confirmed == true )
{
document.classes.submit();
}
}
else
{
alert('You must select a class to delete.');
}
}
// Function to make sure only one checkbox has been selected //
function checkboxes()
{
if( document.classes.selectclass.value == 1 )
{
document.classes.submit();
}
else
{
if( document.classes.selectclass.value > 1 )
{
alert('You can only edit one class at a time.');
}
else
{
alert(document.classes.selectclass.value);
alert('You must select a class to edit.');
}
}
}
// Function to keep track of how many checkboxes are checked //
function updateboxes(row)
{
row = row + 2;
if(document.classes.elements[row].checked)
{
document.classes.selectclass.value = Math.round(document.classes.selectclass.value) - 1;
}
else
{
document.classes.selectclass.value = Math.round(document.classes.selectclass.value) + 1;
}
}
</script>
<h1>Manage Classes</h1>
<br>
<form name='classes' action='./index.php' method='POST'>
<table align='center' width='900' cellspacing='0' cellpadding='0' border='0'>
<b>Semester: </b> <select name='semester' onChange='document.classes.submit();'>
");
// Get a list of semesters //
$query = mysql_query("SELECT semesterid, title FROM semesters ORDER BY startdate DESC")
or die("ViewCourses.php: Unable to get a list of semesters for drop-down - ".mysql_error());
if($_POST['semester']==NULL)
{
$q = mysql_query("SELECT semesterid FROM semesters WHERE startdate < CURDATE() < enddate ORDER BY startdate");
$temp = mysql_fetch_row($q);
$_POST['semester'] = $temp[0];
}
$count=0;
$all = "";
while($semester = mysql_fetch_row($query))
{
if($count==0)
$all = " $semester[0]";
else
$all .= " OR semesterid = $semester[0]";
print("<option value='$semester[0]' ".( $_POST['semester']==$semester[0]&&$_POST['semester']!=NULL ? "SELECTED" : "").">$semester[1]</option>");
$count++;
}
print("
<option value='-1' ".($_POST['semester']==-1 ? "SELECTED" : "").">All</option>");
if($_POST['semester']==-1)
$_POST['semester']=$all;
print(" </select>
<br><br>
</td>
</tr>
<tr>
<td>
<input type='button' value='Add' onClick=\"document.classes.page2.value='9';document.classes.submit();\">
<input type='button' value='Edit' onClick='document.classes.page2.value=11;checkboxes();'>
<input type='button' value='Delete' onClick='document.classes.deleteclass.value=1;validate();'>
<input type='button' value='Show in Grid' onClick='document.classes.page2.value=25;document.classes.submit();' />
<br><br>
<table cellspacing='0' width='900' cellpadding='5' class='dynamiclist'>
<tr class='header'>
<td> </td>
<th>Class Name</th>
<th>Teacher</th>
<th>Semester</th>
<th>Section Number</th>
<th>Room Number</th>
<th>Period Number</th>
<th>Days</th>
<th>Substitute</th>
<th></th>
<th>combo1</th>
<th>combo2</th>
<th>combo3</th>
<th>combo4</th>
</tr>");
// Get the total number of teachers to know how many pages to have //
if($_POST['semester']!="")
{
$query = mysql_query("SELECT COUNT(*) FROM courses WHERE semesterid = $_POST[semester]")
or die("$_POST[semester] - ManageClasses.php: Unable to retrieve total number of classes - ".mysql_error());
$numrows = mysql_result($query,0);
$numpages = ceil($numrows / 25);
if($_POST["onpage"] == "")
{
$_POST["onpage"]=1;
}
// Get and display the classes //
$query = mysql_query("SELECT c.courseid, c.semesterid, c.coursename, c.sectionnum, c.roomnum, c.periodnum, c.teacherid, c.dotw, c.substituteid, c.combo1, combo2, combo3, combo4 FROM courses c WHERE c.semesterid=$_POST[semester]")
or die(mysql_error());
$row = 0;
while($class = mysql_fetch_row($query))
{
$row++;
if($row > ($_POST["onpage"]*25)-25 && $row <= ($_POST["onpage"]*25))
{
$actualrow++;
$q = mysql_query("SELECT s.title FROM semesters s WHERE s.semesterid = $class[1] LIMIT 1")
or die("ManageClasses.php: Unable to get the semester title for the current course being displayed - ".mysql_error());
$semester = mysql_fetch_row($q);
$q = mysql_query("SELECT t.fname, t.lname FROM teachers t WHERE t.teacherid = $class[6] LIMIT 1")
or die("ManageClasses.php: Unable to get the teacher name for the current course being displayed - ".mysql_error());
$teacher = mysql_fetch_row($q);
$q = mysql_query("SELECT t.fname, t.lname FROM teachers t where t.teacherid = '$class[8]' LIMIT 1")
or die("ManageClasses.php: Unable to get the substitute name for the current corse being displayed - ".mysql_error());
$sub = mysql_fetch_row($q);
print("<tr class='".( $row%2==0 ? "even" : "odd" )."'>
<td><input type='checkbox' name='delete[]' value='$class[0]' onClick='updateboxes($actualrow);' /></td>
<td>$class[2]</td>
<td>$teacher[0] $teacher[1]</td>
<td>$semester[0]</td>
<td>$class[3]</td>
<td>$class[4]</td>
<td>$class[5]</td>
<td>$class[7]</td>
<td>$class[8]</td>
<td>$sub[0] $sub[1]</td>
<td>$class[9]</td>
<td>$class[10]</td>
<td>$class[11]</td>
<td>$class[12]</td>
</tr>");
}
}
}
else
{
$numpages = 1;
$_POST['onpage']=1;
}
print(" </table>
<br>
<input type='button' value='Add' onClick='document.classes.page2.value=9;document.classes.submit();'>
<input type='button' value='Edit' onClick='document.classes.page2.value=11;checkboxes();'>
<input type='button' value='Delete' onClick='document.classes.deleteclass.value=1;validate();'>
<input type='button' value='Show in Grid' onClick='document.classes.page2.value=25;document.classes.submit();' />
<br><br>
<font color='red'>* Deleting a class will also delete the information for that class</font>
<br><br>
<center>Page: ");
for($i=1; $i<=$numpages; $i++)
{
if($i == $_POST["onpage"])
{
print("<a href='JavaScript: document.classes.deleteclass.value=0;document.classes.page2.value=0;document.classes.onpage.value=$i;document.classes.submit();' class='selectedpagenum' onMouseover=\"window.status='Go to page $i';return true;\" onMouseout=\"window.status='';return true;\">$i</a> \n");
}
else
{
print("<a href='JavaScript: document.classes.deleteclass.value=0;document.classes.page2.value=0;document.classes.onpage.value=$i;document.classes.submit();' class='pagenum' onMouseover=\"window.status='Go to page $i';return true;\" onMouseout=\"window.status='';return true;\">$i</a> \n");
}
}
print("\n</center>
<input type='hidden' name='deleteclass'>
<input type='hidden' name='selectclass'>
<input type='hidden' name='page2' value='$page2'>
<input type='hidden' name='onpage' value='$_POST[onpage]'>
<input type='hidden' name='logout'>
<input type='hidden' name='page' value='$page'>
</form>
</td>
</tr>
</table>
<table width='520' border=0 cellspacing=0 cellpadding=0 height=1>
<tr>
<td valign='top'>
<empty>
</td>
</tr>
</table>
");
?>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Y este es el java script de los combos
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var categories = [];
categories["startList"] = ["Derecho","Pedagogia"]/*secciones-ropa-libros*//* = secciones licenciaturas*/
categories["Derecho"] = [
" ","-----ÁREA DE BÁSICA-----"," ",
"Introducción al Estudio del Derecho","Métodos y Técnicas de la Investigación Jurídica","Derecho Romano","Teoría del Derecho",
"Ética Jurídica","Acto Jurídico y Personas(Derecho Civil I)","Introducción al Derecho Penal","Lexicología Jurídica",
"Bienes y Derechos Reales.(Derecho Civil II)","Teoría Penal y del Delito","Derecho Individual del Trabajo","Derecho Constitucional",
"Sociedades Mercantiles","Derecho Administrativo I","Familia y Secesiones(Derecho Civil III)","Delitos En Particular"," ",
"-----ÁREA DE DESARROLLO-----"," ",
"Derecho Colectivo del trabajo","Garantías Constitucionales(Individuales y Sociales)","Títulos y Operaciones de Crédito",
"Derecho Administrativo II","Derecho Fiscal I","Obligaciones y Contratos(Derecho Civil IV)","Derecho Procesal Laboral",
"Seguridad Social","Amparo","Derecho Procesal Administrativo","Derecho Fiscal II","Teoría del Proceso","Derecho Procesal Civil",
"Derecho Procesal Penal","Práctica Forense de Amparo"," ",
"-----ÁREA DE PROFESIONAL-----"," ",
"Propiedad Intelectual","Derecho Procesal Fiscal","Régimen Jurídico del Comercio Exterior","Derecho Internacional Público y Privado",
"Criminalística","Criminología","Medicina Legal","Victimologia", "Oratoria","Juicios Orales en Materia Civil",
"Juicios Orales en Materia Penal"," ",];
categories["Introducción al Estudio del Derecho"] = ["LD01"];
categories["LD01"] = ["DBH1IED","DBH2IED","DBH3IED","DBH4IED","DBH5IED","DBH6IED","DBVIED"];
categories["Métodos y Técnicas de la Investigación Jurídica"] = ["LD02"];
categories["LD02"] = ["DBH1MTIJ","DBH2MTIJ","DBH3MTIJ","DBH4MTIJ","DBH5MTIJ","DBH6MTIJ","DBVMTIJ"];
categories["Derecho Romano"] = ["LD03"];
categories["LD03"] = ["DBH1DR","DBH2DR","DBH3DR","DBH4DR","DBH5DR","DBH6DR","DBVDR"];
categories["Teoría del Derecho"] = ["LD04"];
categories["LD04"] = ["DBH1TD","DBH2TD","DBH3TD","DBH4TD","DBH5TD","DBH6TD","DBVTD"];
categories["Ética Jurídica"] = ["LD05"];
categories["LD05"] = ["DBH1EJ","DBH2EJ","DBH3EJ","DBH4EJ","DBH5EJ","DBH6EJ","DBVEJ"];
categories["Acto Jurídico y Personas(Derecho Civil I)"] = ["LD06"];
categories["LD06"] = ["DBH1AJP","DBH2AJP","DBH3AJP","DBH4AJP","DBH5AJP","DBH6AJP","DBVAJP"];
categories["Introducción al Derecho Penal"] = ["LD07"];
categories["LD07"] = ["DBH1IDP","DBH2IDP","DBH3IDP","DBH4IDP","DBH5IDP","DBH6IDP","DBVIDP"];
categories["Lexicología Jurídica"] = ["LD08"];
categories["LD08"] = ["DBH1LJ","DBH2LJ","DBH3LJ","DBH4LJ","DBH5LJ","DBH6LJ","DBVLJ"];
categories["Bienes y Derechos Reales.(Derecho Civil II)"] = ["LD09"];
categories["LD09"] = ["DBH1BDR","DBH2BDR","DBH3BDR","DBH4BDR","DBH5BDR","DBH6BDR","DBVBDR"];
categories["Teoría Penal y del Delito"] = ["LD10"];
categories["LD10"] = ["DBH1TPD","DBH2TPD","DBH3TPD","DBH4TPD","DBH5TPD","DBH6TPD","DBVTPD"];
categories["Derecho Individual del Trabajo"] = ["LD11"];
categories["LD11"] = ["DBH1DIT","DBH2DIT","DBH3DIT","DBH4DIT","DBH5DIT","DBH6DIT","DBVDIT"];
categories["Derecho Constitucional"] = ["LD12"];
categories["LD12"] = ["DBH1DC","DBH2DC","DBH3DC","DBH4DC","DBH5DC","DBH6DC","DBVDC"];
categories["Sociedades Mercantiles"] = ["LD13"];
categories["LD13"] = ["DBH1SM","DBH2SM","DBH3SM","DBH4SM","DBH5SM","DBH6SM","DBVSM"];
categories["Derecho Administrativo I"] = ["LD14"];
categories["LD14"] = ["DBH1DA1","DBH2DA1","DBH3DA1","DBH4DA1","DBH5DA1","DBH6DA1","DBVDA1"];
categories["Familia y Secesiones(Derecho Civil III)"] = ["LD15"];
categories["LD15"] = ["DBH1FS","DBH2FS","DBH3FS","DBH4FS","DBH5FS","DBH6FS","DBVFS"];
categories["Delitos En Particular"] = ["LD16"];
categories["LD16"] = ["DBH1DP","DBH2DP","DBH3DP","DBH4DP","DBH5DP","DBH6DP","DBVDP"];
categories["Derecho Colectivo del trabajo"] = ["LD17"];
categories["LD17"] = ["DDH1DCT","DDH2DCT","DDH3DCT","DDH4DCT","DDH5DCT","DDH6DCT","DDVDCT"];
categories["Garantías Constitucionales(Individuales y Sociales)"] = ["LD18"];
categories["LD18"] = ["DDH1GC","DDH2GC","DDH3GC","DDH4GC","DDH5GC","DDH6GC","DDVGC"];
categories["Títulos y Operaciones de Crédito"] = ["LD19"];
categories["LD19"] = ["DDH1TOC","DDH2TOC","DDH3TOC","DDH4TOC","DDH5TOC","DDH6TOC","DDVTOC"];
categories["Derecho Administrativo II"] = ["LD20"];
categories["LD20"] = ["DDH1DA2","DDH2DA2","DDH3DA2","DDH4DA2","DDH5DA2","DDH6DA2","DDVDA2"];
categories["Derecho Fiscal I"] = ["LD21"];
categories["LD21"] = ["DDH1DF1","DDH2DF1","DDH3DF1","DDH4DF1","DDH5DF1","DDH6DF1","DDVDF1"];
categories["Obligaciones y Contratos(Derecho Civil IV)"] = ["LD22"];
categories["LD22"] = ["DDH1OC","DDH2OC","DDH3OC","DDH4OC","DDH5OC","DDH6OC","DDVOC"];
categories["Derecho Procesal Laboral"] = ["LD23"];
categories["LD23"] = ["DDH1DPL","DDH2DPL","DDH3DPL","DDH4DPL","DDH5DPL","DDH6DPL","DDVDPL"];
categories["Seguridad Social"] = ["LD24"];
categories["LD24"] = ["DDH1SS","DDH2SS","DDH3SS","DDH4SS","DDH5SS","DDH6SS","DDVSS"];
categories["Amparo"] = ["LD25"];
categories["LD25"] = ["DDH1A","DDH2A","DDH3A","DDH4A","DDH5A","DDH6A","DDVA"];
categories["Derecho Procesal Administrativo"] = ["LD26"];
categories["LD26"] = ["DDH1DPA","DDH2DPA","DDH3DPA","DDH4DPA","DDH5DPA","DDH6DPA","DDVDPA"];
categories["Derecho Fiscal II"] = ["LD27"];
categories["LD27"] = ["DDH1DF2","DDH2DF2","DDH3DF2","DDH4DF2","DDH5DF2","DDH6DF2","DDVDF2"];
categories["Teoría del Proceso"] = ["LD28"];
categories["LD28"] = ["DDH1TP","DDH2TP","DDH3TP","DDH4TP","DDH5TP","DDH6TP","DDVTP"];
categories["Derecho Procesal Civil"] = ["LD29"];
categories["LD29"] = ["DDH1DPC","DDH2DPC","DDH3DPC","DDH4DPC","DDH5DPC","DDH6DPC","DDVDPC"];
categories["Derecho Procesal Penal"] = ["LD30"];
categories["LD30"] = ["DDH1DPP","DDH2DPP","DDH3DPP","DDH4DPP","DDH5DPP","DDH6DPP","DDVDPP"];
categories["Práctica Forense de Amparo"] = ["LD31"];
categories["LD31"] = ["DDH1PFA","DDH2PFA","DDH3PFA","DDH4PFA","DDH5PFA","DDH6PFA","DDVPFA"];
categories["Propiedad Intelectual"] = ["LD32"];
categories["LD32"] = ["DPH1PI","DPH2PI","DPH3PI","DPH4PI","DPH5PI","DPH6PI","DPVPI"];
categories["Derecho Procesal Fiscal"] = ["LD33"];
categories["LD33"] = ["DPH1DPF","DPH2DPF","DPH3DPF","DPH4DPF","DPH5DPF","DPH6DPF","DPVDPF"];
categories["Régimen Jurídico del Comercio Exterior"] = ["LD34"];
categories["LD34"] = ["DPH1RJCE","DPH2RJCE","DPH3RJCE","DPH4RJCE","DPH5RJCE","DPH6RJCE","DPVRJCE"];
categories["Derecho Internacional Público y Privado"] = ["LD35"];
categories["LD35"] = ["DPH1DIPP","DPH2DIPP","DPH3DIPP","DPH4DIPP","DPH5DIPP","DPH6DIPP","DPVDIPP"];
categories["Criminalística"] = ["LD36"];
categories["LD36"] = ["DPH1C","DPH2C","DPH3C","DPH4C","DPH5C","DPH6C","DPVC"];
categories["Criminología"] = ["LD37"];
categories["LD37"] = ["DPH1CR","DPH2CR","DPH3CR","DPH4CR","DPH5CR","DPH6CR","DPVCR"];
categories["Medicina Legal"] = ["LD38"];
categories["LD38"] = ["DPH1ML","DPH2ML","DPH3ML","DPH4ML","DPH5ML","DPH6ML","DPVML"];
categories["Victimologia"] = ["LD39"];
categories["LD39"] = ["DPH1V","DPH2V","DPH3V","DPH4V","DPH5V","DPH6V","DPVV"];
categories["Oratoria"] = ["LD40"];
categories["LD40"] = ["DPH1O","DPH2O","DPH3O","DPH4O","DPH5O","DPH6O","DPVO"];
categories["Juicios Orales en Materia Civil"] = ["LD41"];
categories["LD41"] = ["DPH1JOMC","DPH2JOMC","DPH3JOMC","DPH4JOMC","DPH5JOMC","DPH6JOMC","DPVJOMC"];
categories["Juicios Orales en Materia Penal"] = ["LD42"];
categories["LD42"] = ["DPH1JOMP","DPH2JOMP","DPH3JOMP","DPH4JOMP","DPH5JOMP","DPH6JOMP","DPVJOMP"];
var nLists = 4; // number of select lists in the set
function fillSelect(currCat,currList){
var step = Number(currList.name.replace(/\D/g,""));
for (i=step; i<nLists+1; i++) {
document.forms['addclass']['combo'+i].length = 1;
document.forms['addclass']['combo'+i].selectedIndex = 0;
}
var nCat = categories[currCat];
for (each in nCat) {
var nOption = document.createElement('option');
var nData = document.createTextNode(nCat[each]);
nOption.setAttribute('value',nCat[each]);
nOption.appendChild(nData);
currList.appendChild(nOption);
}
}
function getValue(c4, c3, c2, c1) {
;
}
function init() {
fillSelect('startList',document.forms['addclass']['combo1'])
}
navigator.appName == "Microsoft Internet Explorer" ? attachEvent('onload', init, false) : addEventListener('load', init, false);
Espero que alguien me puede ayudar muchas gracias por leer este mensaje:)