Jump to content

AjaxSearch


Soma
 Share

Recommended Posts

  • 1 year later...
  • 2 years later...
4 hours ago, flydev said:

Hi again,

257146394_Sanstitre.png.124c1376769313afb3b593e3c2747663.png

look like you forgot to include jQuery ?

 

It's here at the end of the page. It's including itself with the plugin . 

2055987737_PrtScrcapture_4.jpg.491a630113721f054c6042b1d6d9021a.jpg

But I added this at the end of my search.php template whihc was missing. 

<?php 

if(!$config->ajax) include("./head.inc");
echo $out;
if(!$config->ajax) include("./foot.inc"); 

?>

 

Still nothing shows up!

 

Link to comment
Share on other sites

Nope jQuery (the third party JavaScript library) isn't added by the module.

 

Try to add this piece of code just after the footer then refresh your page :

<script src="https://code.jquery.com/jquery-3.3.1.js" crossorigin="anonymous"></script>

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

17 hours ago, flydev said:

Nope jQuery (the third party JavaScript library) isn't added by the module.

 

Try to add this piece of code just after the footer then refresh your page :


<script src="https://code.jquery.com/jquery-3.3.1.js" crossorigin="anonymous"></script>

  

?‍♂️ Great it works now! 

P.S Perhaps it should added to the readme of the plugin. 

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

In case someone else stumbles over similar demands like me, I put my modified AjaxSearch.js here: AjaxSearch.js

It allows to use an existing #ajaxSearch element, so you may place the result anywhere in your markup (for example an overlay like I did here: https://pwflex.team-tofahrn.de/).

Then I had a problem with excess GET requests which do not cancel server-side processing, so getting the result after typing many characters took seconds. That script uses a different scheduling.

Its a direct replacement, so you may try and revert to the original safely.

Edit: I've updated the script to send the value URI encoded like this:

        data: param_name+"="+encodeURIComponent(value),

Allows to send queries containing special chars like &

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...