Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function zapiszNowyTitle() { // function to save given title
- var el = document.getElementById('input_givenToAdd').value;
- if ( el !== '' ) {
- var xmlhttp;
- if (window.XMLHttpRequest) {
- xmlhttp=new XMLHttpRequest();
- } else {
- xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
- }
- xmlhttp.onreadystatechange=function() {
- if (xmlhttp.readyState==4 && xmlhttp.status==200) {
- document.getElementById('dodawarka').outerHTML = '<li><span class="istniejacyTitle">' + xmlhttp.responseText + '</span></li>' + "\r\n" + '<li><a id="niekliknieteDodawanie" href="#">Dodaj nową podstronę</a></li>' + "\r\n";
- przyciskPokazujacyInputBox();
- przyciskRozpoczynajacyEdycje();
- }
- };
- el = encodeURIComponent(el);
- el = el.replace(/\#/g, '#'); // replaces all '#'
- el = el.replace(/\\/g, '\'); // replaces all '\'
- alert(el);
- xmlhttp.open("GET","process_add_article.php?&title=" + (el),true);
- xmlhttp.send();
- } else {
- alert('Proszę podać nazwę nowej podstrony!');
- }
- }
- function rozpocznijEdycjePodstrony(el) { // function to send edited map info to DB
- el = encodeURIComponent(el);
- el = el.replace(/\#/g, '#'); // replaces all '#'
- el = el.replace(/\\/g, '\'); // replaces all '\'
- window.location.href = "process_article_selection.php?&id=" + (el);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement