Skocz do zawartości
  • 0

Zmiana zawartości diva JQ


P0Y3B

Pytanie

Dobry.

 

Chce zmienić div border_wrapper na to co mam w pliku regulamin.html

 

Wykombinowałem z google taki kod:

 

wstawilem to w head:

 

 

<script>

var r; var e; function odbierzDane() { if (r.readyState == 4) { if (r.status == 200 || r.status == 304) { e.innerHTML = r.responseText; } } } function wymienTresc(adresurl, htmlid) { if (r = getXMLHttpRequest()) { e = document.getElementById(htmlid); r.open('GET', adresurl); r.onreadystatechange = odbierzDane; r.send(null); } }

</script>

 

Oraz

 

<li class=""><a href="#" onclick="wymienTresc('regulamin.html', 'border_wrapper');">
<i class="fa fa-bars" aria-hidden="true"></i> Regulamin</a></li>

Gdzie jest blad ze nic nie wyswietla ?

Odnośnik do komentarza
Udostępnij na innych stronach

8 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

<script type="text/javascript" src="http://sklep.ragnarokmt2.pl/jquery-3.1.1.min.js"></script>

Wchodząc w ten link pokazuje zawartość, więc w czym może istnieć problem?

Tutaj mam tylko error 

(function(event){ajax_load('regulamin.html')
})

Rzeczywiście pokazuje zawartość...

IWwqFhE.png

anNO14B_460sa.gif

Odnośnik do komentarza
Udostępnij na innych stronach

Nowy kod,

 

http://sklep.ragnarokmt2.pl/jquery-3.1.1.min.js%22 Failed to load resource: the server responded with a status of 404 (Not Found)
(index):13 Uncaught SyntaxError: Unexpected token .
http://sklep.ragnarokmt2.pl/css/images/bg.png Failed to load resource: the server responded with a status of 404 (Not Found)
http://sklep.ragnarokmt2.pl/css/images/icons/error.png Failed to load resource: the server responded with a status of 404 (Not Found)
VM3966 :57 Uncaught ReferenceError: ajax_load is not defined
    at HTMLAnchorElement.onclick (VM3966 :57)
VM3966 :57 Uncaught ReferenceError: ajax_load is not defined
    at HTMLAnchorElement.onclick (VM3966 :57)
VM3966 :57 Uncaught ReferenceError: ajax_load is not defined
    at HTMLAnchorElement.onclick (VM3966 :57)
VM3966 :57 Uncaught ReferenceError: ajax_load is not defined
    at HTMLAnchorElement.onclick (VM3966 :57)
VM3966 :57 Uncaught ReferenceError: ajax_load is not defined
    at HTMLAnchorElement.onclick (VM3966 :57)
VM3966 :57 Uncaught ReferenceError: ajax_load is not defined
    at HTMLAnchorElement.onclick (VM3966 :57)
VM3966 :57 Uncaught ReferenceError: ajax_load is not defined
    at HTMLAnchorElement.onclick (VM3966 :57)
VM3966 :57 Uncaught ReferenceError: ajax_load is not defined
    at HTMLAnchorElement.onclick (VM3966 :57)
Odnośnik do komentarza
Udostępnij na innych stronach

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający forum Zmiana zawartości diva JQ   0 użytkowników
    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...