Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 10th, 2012  |  syntax: None  |  size: 1.09 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. * Function: toonAlbumsPerSoorWer
  2.  * Purpose:  ...
  3.  * Returns:  -
  4.  * Inputs:   -
  5.  */
  6. function toonAlbumsPerSoorWerk(){
  7.     getXMLHttpObject();
  8.     var soortWerkId = document.getElementById("soortAlbumKeuze").value;
  9.     //alert(soortWerkId);
  10.     var url = "server.php?page=ajaxSoortWerkAlbumMaken&" + "dummy=" + Math.random() + "&soortWerkId=" + soortWerkId;
  11.    alert(url);
  12.    xmlHttp.open("GET", url, true);
  13.     xmlHttp.onreadystatechange = toonAlbumsPerSoortWerkXHTML;
  14.     // request doen
  15.     xmlHttp.send(null);
  16. }
  17.  
  18.  
  19. /*
  20.  * Function: toonAlbumsPerSoorWerkXHTML
  21.  * Purpose:  ...
  22.  * Returns:  -
  23.  * Inputs:   -
  24.  */
  25. function toonAlbumsPerSoortWerkXHTML()
  26. {
  27.     // 4 = complete, alle data is toegekomen,
  28.     // connectie is gesloten
  29.  
  30.     if (xmlHttp.readyState == 4) {
  31.         var antwoord = xmlHttp.responseText;
  32.         alert(antwoord);
  33.         // antwoord in XHTML-opmaak, dus innerHTML
  34.         document.getElementById("albumKeuze").innerHTML = "<option value=\"-1\" selected>Nieuw hoofdalbum</option>";
  35.         document.getElementById("albumKeuze").innerHTML = antwoord;
  36.     }
  37. }