Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function processServAction(modo){
- console.log("Modo: " + modo);
- switch(modo){
- case modes.UpServ:
- var jsonArr;
- $.getJSON('../php/query.php',{ T : 3, V : userData.Id }, function(response,status,xhr){
- jsonArr = response;
- }).done(function(){
- //console.info(jsonArr);
- $('#contenedor').load("addService.htm", function(){
- $.each(jsonArr, function(i,row){
- $('#domains').append("<option id='" + row.idDominio + "'>" + row.url + "</option>" );
- });
- //Limit port field to only numbers
- $('#port').on("keypress", function(e){
- if ("01234567890.-\b\0".indexOf(String.fromCharCode(e.which)) < 0) {
- event.preventDefault();
- }
- });
- $('#sCancel').on("click",function(e){cancelAction(e);});
- $('#sAlta').on("click", function(e){ altaServicio(e);});
- function altaServicio(e){
- e.preventDeafult();
- var jsonObj = { "Frec" : $('#frec').val(),
- "sendMail" : getCheckVal($('#sendMail')),
- "VerifConf" : getCheckVal($('#verifConf')),
- "VerifProcess" : getCheckVal($('#verifProc')) };
- $.getJSON('../php/getConfId.pgp', { config : jsonObj }, function(reponse){
- console.info(response);
- });
- }
- });
- });
- break;
- }
- function getCheckVal(chk){
- chk.is(":checked") ? 1 : 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment