Advertisement
Guest User

Untitled

a guest
Nov 15th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function editEvent() {
  2.    
  3.     var id = '<?php echo $_REQUEST['id']; ?>';
  4.     var title = document.addevent.title.value;
  5.     var description = document.addevent.description.value;
  6.     var image = document.addevent.image.value;
  7.     var dates = document.addevent.date.value;
  8.     var time = document.addevent.tStart.value + " - " + document.addevent.tEnd.value;
  9.     var date_post = document.addevent.date_post.value;
  10.     var campus_list = $('input:checkbox:checked').map(function() { return this.value }).get();
  11.    
  12.     var url = "events.php?action=update&id=" + id + "&title=" + title + "&description=" + description + "&image=" + image + "&dates=" + dates + "&time=" + time + "&date_post=" + date_post + "&campus_list=" + campus_list;
  13.    
  14.     var xmlHttp = null;
  15.    
  16.     xmlHttp = new XMLHttpRequest();
  17.     xmlHttp.open("GET", url, false );
  18.     xmlHttp.send(null);
  19.     alert(xmlHttp.responseText);
  20.     //window.open("http://les.lincoln1.local/edit_campus_events.php", _parent);
  21.     window.parent.location = "http://les.lincoln1.local/edit_campus_events.php";
  22.    
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement