view src/main/webapp/resources/js/proxyMethods.js @ 0:3e62083dbcbf

First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Thu, 23 Apr 2015 15:46:01 +0200
parents
children 37840afb7b80
line wrap: on
line source



function setAction(action, formName){
	var theForm = document.forms[formName];
    var input = document.createElement('input');
    input.type = 'hidden';
    input.name = 'action';
    input.value = action;
    theForm.appendChild(input);    
}


function setAction0(action, formName, varName, varValue){
	
	var theForm = document.forms[formName];
    var input = document.createElement('input');
    input.type = 'hidden';
    input.name = varName;
    input.value = varValue;
    theForm.appendChild(input);  
	
	setAction(action, formName);
}

function deleteBranch(action, formName, branchId){
	
	var theForm = document.forms[formName];
    var input = document.createElement('input');
    input.type = 'hidden';
    input.name = 'branchId';
    input.value = branchId;
    theForm.appendChild(input);  
	
	setAction(action, formName);
}

function addContributor(action, formName, userId){
	var theForm = document.forms[formName];
    var input = document.createElement('input');
    input.type = 'hidden';
    input.name = 'userId';
    input.value = userId;
    theForm.appendChild(input);  
	setAction(action, formName);
}