Files
fdn2/public/js/functions.js
T
Riccardo Di Dato fa648c0850 Creato sistema accetazione commenti;
Create pagine per notizie in pending e rifiutate;
Creati componenti grafici per mostrare Notizia, Commento e lista
commenti;
Bugfix e limature su amministrazione
2016-02-29 18:44:22 +01:00

7 lines
338 B
JavaScript

function openPagePost(page, request, blank = false){
var inputs = '';
request.forEach(function(element, index, array){
inputs += '<input type="hidden" name="'+element.name+'" value="'+element.value+'" />';
});
$('<form '+(blank?'target="_blank" ':"")+'method="POST" action="'+page+'">'+inputs+'</form>').appendTo("body").submit();
}