Skip to content
General Revolution Evolution Add-ons International
Login | Register | MODX.com
MODX Open Source Content Management System, Framework, Platform and More.
Find a Partner | Hosts + SaaS | Jobs | Donate
  • RegisterSign Up with the MODX Community
  • LoginUse Your MODX.com Account
  • MODX Community Forums
  • Add-ons
  • Search
  • AjaxSearch
  •  
  • [SOLVED] move script additions to before closing body tag #

  • 6038
    138

    crunch Reply #1, 11 months, 1 week ago

    Reply
    • Link to this post#1
    Is there an easy way to get AjaxSearch to insert its script tags before the closing body tag, rather than before the closing head tag?

    I have moved all my other javascript to the just before the closing body tag as part of a performance improvement - but the ajaxsearch script is bombing my javascript because it uses jquery is loaded later in the page.

    The site I'm referring to is using AjaxSearch v1.9.2 with Modx v1.0.5

    Thanks!


  • 4310
    2,276
    Snippets : eForm 1.4.4.7 with SMTP & PMS's security fixes | PHC Results | EasyNewsletter from CSV

    Wiki Articles : Custom DB table to placeholders | Manager Locked Out?

    Websites : Work - U.K. based MODx development  |  Hobby - Free interactive education resources for teaching 4 - 11 year olds

    Hosting : One Smart Host - Professional MODx hosting 

    bunk58 Reply #2, 11 months, 1 week ago

    Reply
    • Link to this post#2
    Around line 884 in assets/snippets/ajaxSearch/classes/ajaxSearchOutput.class.inc.php you'll see function setAjaxSearchHeader() You could try changing the instances of
    $modx->regClientStartupScript
    to
    $modx->regClientScript

    Untested so back it up first!


  • 6038
    138

    crunch Reply #3, 11 months, 1 week ago

    Reply
    • Link to this post#3
    GOLD! Exactly what i was looking for... i should have known this - I've used it in a Revolution site before, but didn't realise it was also in Evo - duh!

    Anyway, it has moved my javascript - but I havn't quite figured out whether that has caused any problems yet, as I'm still grappling with the MinJS snippet which is having a hard time dealing with compressing my jquery...

    thanks bunk58!


  • 4310
    2,276
    Snippets : eForm 1.4.4.7 with SMTP & PMS's security fixes | PHC Results | EasyNewsletter from CSV

    Wiki Articles : Custom DB table to placeholders | Manager Locked Out?

    Websites : Work - U.K. based MODx development  |  Hobby - Free interactive education resources for teaching 4 - 11 year olds

    Hosting : One Smart Host - Professional MODx hosting 

    bunk58 Reply #4, 11 months, 1 week ago

    Reply
    • Link to this post#4
    No problem





Actions

Login to Post

Other Support Options

To file a bug or make a feature request visit our issue tracker, or you can also purchase commercial support.

Love MODX?

If you build sites for a living with MODX or just love using it, why not give back?

Information

Posted in this thread:
bunk58, crunch

 
Back to Top

MODX Global HQ

1333 N Stemmons Fwy, Ste 110
Dallas, TX 75207
United States

+1 (469) 777-MODX (6639)

The MODX Company

  • Contact
  • Media Center
  • Careers at MODX
  • Wall of Fame
  • The MODX Blog

Sponsors

SoftLayer Firehost: Secure Cloud Hosting

Stay Connected

Read our previous email newsletters.

Twitter Facebook Google+ LinkedIn github Feeds

Privacy Policy | Terms of Service | Pixels by AKTA Web Studio© 2005-2012 MODX. All rights reserved. Trademark Policy