function showPage(thepage) { //alert('eee'); new Ajax.Updater('results', '/search/searchResult.jsp', { parameters: {page:thepage, localization:'ALL', showHeaders:'false'} }); } function showSuggestions(thepage) { new Ajax.Updater('suggestions', '/member/suggestions.jsp', { parameters: {suggestionsPage:thepage} }); } function deleteNotification(index) { if (confirm('Voulez vous vraiment supprimer cette notification ?')) { new Ajax.Request('/servlet/com.iel.types.root.participant.DeleteNotificationServlet', { parameters: {index:index}, on313: function(transport){ refreshAll(); } }); } } function addNewNotification() { //alert('ee'); new Ajax.Updater('notifications', '/member/addNotification.jsp'); } function addNotification(index) { new Ajax.Updater('notifications', '/member/addNotification.jsp?index=' + index); } function addToParticipant(theform) { submitForm(theform,'com.iel.types.root.participant.AddNotificationServlet',refreshAll,null); } function refreshAll() { //alert('refresh'); new Ajax.Updater('notifications','/member/notifications.jsp', { asynchronous : false }); showEvents(); /* clearNotification(); refreshNotifications(); moveEnd();*/ } function clearNotification() { new Ajax.Updater('notifications', '/member/notifications.jsp'); //document.getElementById('addNotification').innerHTML = ""; } function showEvents() { new Ajax.Updater('results', '/search/searchResult.jsp?localization=ALL&showHeaders=false&page=null',{ onSuccess: function(transport){ var loading = document.getElementById('loading'); //alert('1'); if (loading != null) { //alert('2'); Element.hide(loading); } } }); } function changeNewsletter() { new Ajax.Request('/servlet/com.iel.types.root.participant.ChangeNewsletterStatusServlet', { parameters: $('news').serialize(true) }); alert('Votre demande a bien été enregistrée'); } /* La fonction pour selectionner le bon radio quand on clique sur les depts, on une distance */ function setCheckedValue(radioObj, newValue) { if(!radioObj) return; var radioLength = radioObj.length; if(radioLength == undefined) { radioObj.checked = (radioObj.value == newValue.toString()); return; } for(var i = 0; i < radioLength; i++) { radioObj[i].checked = false; if(radioObj[i].value == newValue.toString()) { radioObj[i].checked = true; } } } function showDislike(reference) { displayMessageAndAction('/member/showSuggestions.jsp?reference=' + reference,ben); //window.location.href='/sport'; /* new Ajax.Updater('dislike-' + reference,'/member/showSuggestions.jsp', { parameters : {reference:reference} });*/ } function ben() { showSuggestions(0); }