[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9386] registration: one more level
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [9386] registration: one more level |
Date: |
Sun, 13 May 2012 21:22:13 +0000 |
Revision: 9386
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9386
Author: sigurdne
Date: 2012-05-13 21:22:13 +0000 (Sun, 13 May 2012)
Log Message:
-----------
registration: one more level
Modified Paths:
--------------
trunk/registration/js/portico/ajax.js
Modified: trunk/registration/js/portico/ajax.js
===================================================================
--- trunk/registration/js/portico/ajax.js 2012-05-13 20:57:19 UTC (rev
9385)
+++ trunk/registration/js/portico/ajax.js 2012-05-13 21:22:13 UTC (rev
9386)
@@ -161,5 +161,47 @@
}
});
});
+
+ $("#loc5").change(function () {
+ var loc1 = $("#loc1").val();
+ var loc2 = $("#loc2").val();
+ var loc3 = $("#loc3").val();
+ var loc4 = $("#loc4").val();
+ var loc5 = $(this).val();
+ $("#loc6").html( "<option></option>" );
+ if(!loc5)
+ {
+ return false;
+ }
+
+ var oArgs = {menuaction:'registration.boreg.get_locations',
location_code:loc1 + "-" + loc2 + "-" + loc3 + "-" + loc4 + "-" + loc5};
+ var requestUrl = phpGWLink('registration/main.php', oArgs,
true);
+
+ var htmlString = "";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl,
+ success: function(data) {
+ if( data != null)
+ {
+ htmlString = "<option value = ''>" +
data.length + " lokasjone(r) funnet</option>"
+ var obj = data;
+ $.each(obj, function(i) {
+ htmlString += "<option
value='" + obj[i].id + "'>"+ obj[i].name + "</option>";
+ });
+
+ $("#loc6").html( htmlString );
+ }
+ else
+ {
+ htmlString += "<option>Ingen
lokasjoner</option>"
+ $("#loc6").html( htmlString );
+ }
+ }
+ });
+ });
+
});
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9386] registration: one more level,
Sigurd Nes <=