narendra_thapa

i have installed a jquery by downloading it, here is the screenshot of Network http://www.screencast.com/t/b3msOjwe

lancecoder

Then now that is working because your status is 200. Click it and you see the output from the controller method you made.

lancecoder

Please do more review about ajax and php. You are confused because you are just basing on the console at the top of the ajax. If the ajax request is a success or 200 status then inside success block of the ajax you may console it from the server response.

narendra_thapa

i am new to ajax and i am reviewing it but my poblem directing to controller via ajax is not solved yet, i got the message in the network but i didn,t get in my console

lancecoder

What your functionality is about? I don't know what do you like to do with your ajax because it was 200 status and that was already communicated with the controller. Can you click the Network and see me the screenshot of what is the result after you select an option?

narendra_thapa

it is showing 200 status code in network but it is returning error function so help me to figure out where exactly the problem is https://www.screencast.com/t/cn0Oxo4Lh9T

lancecoder

That is now working dude. That is from your controller which is your array converted to json.

return response()->json(['msg','this is message from ajax']);

Kindly remove all your console log and replace your success block of your ajax of the code below.

success:function(data){
    console.log(data); // it will display your json response from the server
}
lancecoder

Take a look also about this tutorial: https://tutorials.kode-blog.com/laravel-5-ajax-tutorial

narendra_thapa

my success function is not executing here , it is executing error function.. and i am not able to find out the problem here

lancecoder

can you see me the screenshot?

narendra_thapa

here is the screen shot of route, ajax.js and browser o/p https://www.screencast.com/t/b6u3kzAkjUoA

narendra_thapa

can i send with it gmail, i tried but ur address wasnot recognize

sheeraz

Very educating story, saved your site for hopes to read more! 21 Questions

Please sign in or create an account to participate in this conversation.