Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. function GetScales(scaleTypeID) {
  2. var id;
  3. if (scaleTypeID == "Natural") {
  4. id = 0;
  5. }
  6. else if (scaleTypeID == "Melodic") {
  7. id = 1;
  8. }
  9. else if (scaleTypeID == "Harmonic") {
  10. id = 2;
  11. }
  12. else {
  13. id = -1;
  14. }
  15.  
  16. guitarv2.ScaleSelectionService.GetScaleList(id, OnRequestComplete, OnError);
  17. }
  18.  
  19. function OnRequestComplete(result) {
  20. console.log("ggg OnRequestComplete");
  21. try {
  22. //debugger;
  23. var DropDownScaleName = $get('<%#GetDropDownScaleName()%>');
  24. console.log("ggg DropDownScaleName=" + DropDownScaleName);
  25. DropDownScaleName.innerHTML = "";
  26. for (var n = 0; n < result.length; n++) {
  27. var option = document.createElement("option");
  28. option.value = result[n].ID;
  29. option.innerHTML = result[n].Description;
  30. DropDownScaleName.appendChild(option);
  31. }
  32. }
  33. catch (err) {
  34. ErrorMsg(err);
  35. }
  36. }
  37.  
  38. var DropDownScaleName = $get('<%#GetDropDownScaleName()%>');
  39.  
  40. protected string GetDropDownScaleName()
  41. {
  42. string ddlName = DropDownListScaleName.UniqueID.ToString();
  43. ddlName = ddlName.Replace("$", "_");
  44. Debug.WriteLine("ggg Dropdown = " + ddlName);
  45. return (ddlName);
  46. }
  47.  
  48. ggg Dropdown = ctl00_ContentPlaceHolder2_DropDownListScaleName
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement