Ajax-Überprüfung in LaravelPhp

PHP-Programmierer chatten hier
Anonymous
 Ajax-Überprüfung in Laravel

Post by Anonymous »

Ich versuche eine Ajax-Überprüfung durchzuführen, weiß aber nicht, warum es nicht funktioniert.
Dies ist mein Ajax-Skript:

Code: Select all


function checkWords () {
var status = document.getElementById("status");
var u = document.getElementById("styled").value;
if(u != "")
{

status.innerHTML = 'Verifying...';
var hr = new XMLHttpRequest();
hr.open("POST","/topicnou",true);
hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
hr.onreadystatechange = function(){
if (hr.readyState == 4 && hr.status == 200)
{status.innerHTML = hr.responseText;}

}

var v = "name="+u;
hr.send(v);

}
}

Das ist mein PHP: PS: Gekaufte Skripte befinden sich in TopicNou.blade.php, was angezeigt wird, wenn Sie zu localhost/topicnou gehen.
Das wird in meiner Konsole angezeigt:

POST http://localhost/topicnou 500 (Interner Serverfehler)
XHR wurde geladen: POST „http://localhost/topicnou“.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post