flightphp / core

An extensible micro-framework for PHP
https://docs.flightphp.com
MIT License
2.63k stars 407 forks source link

Trying to use Jquery with Flight #466

Closed Flashtheorie closed 2 years ago

Flashtheorie commented 2 years ago

I'm developing something where I need to use jquery using .load() but it loads a 404, I tried creating a route, but then it doesn't load the page at all

$("#photos1").load("photosun");

Flight::route('/photosun', function(){ require 'views/affichagephotos1.php'; });

magikstm commented 2 years ago

Could you please share more code related to your issue?

Depending where the related page is, you may need to adjust the line: $("#photos1").load("photosun");

Do either the 1st or the 2nd line work if you visit the pages directly?

Flashtheorie commented 2 years ago

So, you were right, I had an error on the page, that's why it wasn't loading Thank you !