function downloadPDF(){ //window.open('https://presse.metropole.rennes.fr/accueil/documents-presse/dossiers-de-presse/27-12657/lancement-de-la-saison-5-du-budget-participatif?mode=pdf&bprint=1'); populateIframe('https://presse.metropole.rennes.fr/accueil/documents-presse/dossiers-de-presse/27-12657/lancement-de-la-saison-5-du-budget-participatif?mode=pdf&bprint=1'); //window.location.href = 'https://presse.metropole.rennes.fr/accueil/documents-presse/dossiers-de-presse/27-12657/lancement-de-la-saison-5-du-budget-participatif?mode=pdf&bprint=1'; } function back(){ if (typeof document.referrer !== 'undefined' && typeof window.location !== 'undefined' && window.location instanceof Location && typeof window.location.host !== 'undefined' && document.referrer.indexOf(window.location.host) !== -1 && typeof window.history !== 'undefined' && window.history.length > 0 ){ window.history.back(); }else{ window.location.href = 'https://presse.metropole.rennes.fr/accueil/documents-presse/dossiers-de-presse' } } /** Lance une recherche sur le HashTag sélectionné parmi les articles de l'agenda */ var searchHashTag = function(strHashTag){ strHashTag = ( typeof strHashTag !== 'undefined' ? strHashTag : false ); if(!strHashTag){ return null; } submitForm(strHashTag); } /** Soumet le Formulaire */ var submitForm = function (strHashTag){ var searchHashTagForm = document.createElement('FORM'); searchHashTagForm.name = 'searchHashTag'; searchHashTagForm.method = 'POST'; searchHashTagForm.action = 'https://presse.metropole.rennes.fr/accueil/documents-presse/dossiers-de-presse'; var inputDate = document.createElement('INPUT'); inputDate.type = 'TEXT'; inputDate.name = 'search_texte'; inputDate.value = strHashTag; searchHashTagForm.appendChild(inputDate); var bSearch = document.createElement('INPUT'); bSearch.type = 'HIDDEN'; bSearch.name = 'bS'; bSearch.value = 1; searchHashTagForm.appendChild(bSearch); var bSearch = document.createElement('INPUT'); bSearch.type = 'HIDDEN'; bSearch.name = 'bSCalendar'; bSearch.value = 0; searchHashTagForm.appendChild(bSearch); document.body.appendChild(searchHashTagForm); searchHashTagForm.submit(); };