![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 5 Pomógł: 0 Dołączył: 27.05.2016 Ostrzeżenie: (0%) ![]() ![]() |
Panowie, nie działa funkcja default i nie moge ustawić domyślnej podstrony zeby sie wyświetlała...
Jakieś pomysły? Pierwszy raz sie bawie ajaxem Zawartość ajax.js: Kod disableButtons = false;
function loadArticle(id) { if(disableButtons) return; switch(id){ case 1 : url = "podstrona1.php";break; case 2 : url = "podstrona2.php";break; case 3 : url = "podstrona3.php";break; default : case 1; } disableButtons = false; startGETRequest(url, onComplete, onEnd); } function onComplete(text, xml) { var dataDiv = document.getElementById('dataDiv'); dataDiv.innerHTML = text; } function onEnd(text, xml) { disableButtons = false; } Ten post edytował kondziopel 28.05.2016, 12:01:59 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 5 Pomógł: 0 Dołączył: 27.05.2016 Ostrzeżenie: (0%) ![]() ![]() |
Nie działa to własnie, próbowałem już...
może trzeba coś do indexu dodać? U mnie to tak wygląda: Kod <div id="selectorsDiv" class="mainDiv">
<input type="button" class="myButton" value="Wyślij wiadomość" onclick="loadArticle(1)" id="btn1"> <input type="button" class="myButton" value="Team Speak 3" onclick="loadArticle(3)" id="btn3"> <input type="button" class="myButton" value="Media społecznościowe" onclick="loadArticle(2)" id="btn2"> </div> |
|
|
![]() ![]() |
![]() |
Aktualny czas: 5.10.2025 - 08:21 |