Buy your loved one the ultimate gift. Lifetime gift certificates are $100 off.

narendra_thapa

Experience

230

0 Best Reply Awards

  • Member Since 2 Months Ago
  • 0 Lessons Completed
  • 0 Favorites

12th October, 2017

narendra_thapa left a reply on Ajax URL • 2 months ago

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

narendra_thapa left a reply on Ajax URL • 2 months ago

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

narendra_thapa left a reply on Ajax URL • 2 months ago

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

narendra_thapa left a reply on Ajax URL • 2 months ago

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

narendra_thapa left a reply on Ajax URL • 2 months ago

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

narendra_thapa left a reply on Ajax URL • 2 months ago

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

narendra_thapa left a reply on Ajax URL • 2 months ago

got the same problem not directing have a look in this screenshot http://www.screencast.com/t/pklOYoNB

narendra_thapa left a reply on Ajax URL • 2 months ago

yes i had run php artisan serve

narendra_thapa left a reply on Ajax URL • 2 months ago

does it matters running php artisan serve or not

controllers code and routes are in screenshot https://www.screencast.com/t/gfMnQ86xrC

narendra_thapa left a reply on Ajax URL • 2 months ago

u can have a look in this screenshot http://www.screencast.com/t/poSsQMr8TMw

narendra_thapa left a reply on Ajax URL • 2 months ago

it is inside Http/Controllers/controller

narendra_thapa left a reply on Ajax URL • 2 months ago

here is my screenshot have a look https://www.screencast.com/t/wJNibbfZHN4

narendra_thapa left a reply on Ajax URL • 2 months ago

i am not accessing it via ajax, i am just having a problem with it, it shows the GET http://localhost/getLevel?facultyname=BBS 404 (Not Found) error, u can see there in the url path that it is showing in exception which should be http://localhost/project/public/getLevel

narendra_thapa left a reply on Ajax URL • 2 months ago

i don't need it, i am just finding out my problem that why it is not directing to my controller function, help me to sort out this problem

narendra_thapa left a reply on Ajax URL • 2 months ago

i have my manageAdminController file in app/Http/Controllers/controller and it isnot a problem in route

the main problem is in the url that i have written in ajax function while i have written the url='/getlLevel' it should have print localhost/project/public/getLevel in console but it prints /getLevel only, so i need to fix the problem on ajax url part

narendra_thapa left a reply on Ajax URL • 2 months ago

i want to dispaly url

i am checking the URL because it is not directing me to controller, that's why i checked my url by printing it on my console and i found that it is giving /getlevel instead of giving me a localhost/project/public/getLevel

narendra_thapa left a reply on Ajax URL • 2 months ago

ajax.js file

$(function(){ $('#faculty-list').change(function(){ var facultyname=$('#faculty-list :selected').val(); alert(facultyname); var url='/getLevel'; console.log(url); $.ajax({ type:'get', url:url, data:{'facultyname':facultyname}, datatype:'json', success:function(data){ console.log('success'); console.log(data.msg); }, error:function(){ } }) }); });

web.php file

Route::get('/getLevel',array('as'=>'getLevel', 'uses'=>'controller\[email protected]'));

manageAdminController.php file

public function getLevel(Request $request){ echo "getlevel"; return response()->json(['msg','this is message from ajax']); }

problem here is i am not getting the url localhost/projectname/public/getLevel in my console, so it is not directing on controller function getLevel()

11th October, 2017

narendra_thapa left a reply on Ajax URL • 2 months ago

thanks for ur response GhaithAli but it didn't work for me i am having a problem with my url, when i see my url by printing it on my console it is printing the given url as string like

'/getLevel'

it isnot taking a full url path, so help me to figure it out

narendra_thapa started a new conversation Ajax URL • 2 months ago

i am trying to use ajax for dynamic change of dropdown box but URL is not directing to the controller function

ajax function $.ajax({ type:'get', url:"{{URL::route('getLevel')}}", data:{'facultyname':facultyname}, datatype:'html', success:function(data){ console.log('success');

                console.log(data.msg);
                },
            error:function(){

            }
            })

route part Route::get('/getLevel',array('as'=>'getLevel','uses'=>'controller\[email protected]'));

controller part public function getLevel(Request $request){ echo "getlevel";

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

}

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.