Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- url: "magister.xml",
- cache: false,
- success: function (data, textStatus) {
- var wijzigingen = $("WIJZIGING", data);
- alert($(data).html());
- wijzigingen.each(function() {
- var type = parseInt($(this).find("WIJZIGINGSTYPE").text());
- var toelichting = $(this).find("TOELICHTING").text();
- var klas = $(this).find("SUBITEM:eq(0)").find("LESGROEP").text();
- var vak = $(this).find("SUBITEM:eq(0)").find("VAK").text();
- var docent = $(this).find("SUBITEM:eq(0)").find("DOCENT").text();
- var lokaal = $(this).find("SUBITEM:eq(0)").find("LOKAAL").text();
- var lesuur = $(this).find("SUBITEM:eq(0)").find("LESUUR").text();
- switch (type) {
- case 1:
- type = "type 1?";
- break;
- case 2:
- type = "Uitval";
- break;
- case 3:
- type = "Wijziging";
- break;
- }
- var row = '<tr title="' + toelichting + '"><td>' + type + '</td><td>' + klas + '</td><td>' + vak + '</td><td>' + docent + '</td><td>' + lokaal + '</td><td>' + lesuur + '</td></tr>';
- $("#roosterwijzigingen").append(row);
- $("#roosterwijzigingen tr:even").addClass("even");
- });
- }
- });
Add Comment
Please, Sign In to add comment