Advertisement
Guest User

Aurion Test

a guest
Feb 13th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Post to the provided URL with the specified parameters.
  2. function post(path, parameters) {
  3.     var form = $('<form></form>');
  4.  
  5.     form.attr("method", "post");
  6.     form.attr("action", path);
  7.  
  8.     $.each(parameters, function(key, value) {
  9.         var field = $('<input></input>');
  10.  
  11.         field.attr("type", "hidden");
  12.         field.attr("name", key);
  13.         field.attr("value", value);
  14.  
  15.         form.append(field);
  16.     });
  17.  
  18.     // The form needs to be a part of the document in
  19.     // order for us to be able to submit it.
  20.     $(document.body).append(form);
  21.     form.submit();
  22. }
  23.  
  24. myParams = {"form":"form","form:largeurDivCenter":"1693","javax.faces.ViewState":"<à récupérer en bas de code source>","form:Sidebar:j_idt160":"form:Sidebar:j_idt160"}
  25.  
  26. post("https://aurion-lille.isen.fr/faces/LearnerNotationListPage.xhtml",myParams)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement