Title: Help with javascript
Last modified: August 21, 2016

---

# Help with javascript

 *  Resolved [spirittlk](https://wordpress.org/support/users/spirittlk/)
 * (@spirittlk)
 * [12 years ago](https://wordpress.org/support/topic/help-with-javascript-1/)
 * Hi, I’m trying to convert this shortcode to js:
    [hms_testimonials_rotating template
   =“13″ order=”random” direction=”ASC” char_limit=”500″ seconds=”20″ ]
 * This is what I attempted – but I must be doing something wrong as I see nothing
   loaded:
    <script type=“text/javascript” src=“http://www.visionsofheaven.com/_aatest/
   wp-content/plugins/hms-testimonials/js.php?template=13&order=random&direction
   =ASC &char_limit=500&seconds=20”></script>
 * This is the page and I’m attempting to load these in the grey box near bottom
   right.
    [http://www.visionsofheaven.com/_aatest/biography/](http://www.visionsofheaven.com/_aatest/biography/)
 * The shortcode works perfectly. Thanks!
 * [https://wordpress.org/plugins/hms-testimonials/](https://wordpress.org/plugins/hms-testimonials/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Jeff K](https://wordpress.org/support/users/kreitje/)
 * (@kreitje)
 * [12 years ago](https://wordpress.org/support/topic/help-with-javascript-1/#post-4912992)
 * Hello.
 * The output of the javascript on your page is
 *     ```
       <script type=“text/javascript” src=“http://www.visionsofheaven.com/_aatest/wp-content/plugins/hms-testimonials-rotator/js.php?template=13&order=random&direction=ASC
       &char_limit=500&seconds=20”></script>
       ```
   
 * There are a few issues here. First, the quotes are not regular quotes. Secondly,
   you have the path to the plugin directory wrong.
 * Try this instead
 * `<script type="text/javascript" src="http://www.visionsofheaven.com/_aatest/wp-
   content/plugins/hms-testimonials/js.php?template=13&order=random&direction=ASC&
   char_limit=500&seconds=20"></script>`
 * Make sure you have this feature enabled in the Advanced setting of the plugin.
 * Out of curiosity, if this is a WordPress page why are you using the javascript
   implementation instead of the the shortcode?
 * Jeff
 *  Thread Starter [spirittlk](https://wordpress.org/support/users/spirittlk/)
 * (@spirittlk)
 * [12 years ago](https://wordpress.org/support/topic/help-with-javascript-1/#post-4913019)
 * Hi Jeff,
 * Thank you for responding. I tried your suggestion – I copied the code you gave
   me exactly, but it still didn’t work – My theme just printed the code on the 
   page (I use a theme that uses visual composer, so I am cutting and pasting into
   the “raw Js” option under VC).
 * Next I tried this with regular quotes:
    <script type=”text/javascript” src=”[http://www.visionsofheaven.com/_aatest/wp-content/plugins/hms-testimonials/js.php?template=13&order=random&direction=ASC&char_limit=500&seconds=20”></script&gt](http://www.visionsofheaven.com/_aatest/wp-content/plugins/hms-testimonials/js.php?template=13&order=random&direction=ASC&char_limit=500&seconds=20”></script&gt);
 * When I look at the source it appears to be understanding it as javascript – I
   can click on the link and it takes me to the js.php file, but it does not run
   it on the page. I DO have this feature enabled under the advanced settings on
   the wordpress site, and still no go.
 * I don’t know if it is understanding the arguments for the quote rotator – order,
   direction, char_limit, etc?
 * The reason I was attempting to us the javascript version is that it takes a long
   time to load all my testimonials when using the wordpress shortcode. I thought
   perhaps JS would load faster. I have over 220 testimonials.
 * Any thoughts?
    Thank you, Ann
 * ps – referring to this page, bottom right:
    [http://www.visionsofheaven.com/_aatest/biography/](http://www.visionsofheaven.com/_aatest/biography/)
 *  Plugin Author [Jeff K](https://wordpress.org/support/users/kreitje/)
 * (@kreitje)
 * [12 years ago](https://wordpress.org/support/topic/help-with-javascript-1/#post-4913020)
 * Hey Ann,
 * 2 things.
 * First off, you stumbled across a bug from a few updates ago that broke the javascript.
   This isn’t a thoroughly used feature which is why it went undetected for a while.
   I just pushed an update to fix this. It is version 2.2.12.
 * Secondly, tweak your JS just a little to have it rotate:
 * `<script type="text/javascript" src="http://www.visionsofheaven.com/_aatest/wp-
   content/plugins/hms-testimonials/js.php?template=13&order=random&direction=ASC&
   char_limit=500&seconds=20&rotating=true”></script>`
 * I added **&rotating=true** on the end of it.
 * Let me know if this fixes your issue.
 * Jeff
 *  Thread Starter [spirittlk](https://wordpress.org/support/users/spirittlk/)
 * (@spirittlk)
 * [12 years ago](https://wordpress.org/support/topic/help-with-javascript-1/#post-4913022)
 * Hi Jeff, Still not working 🙂 I’m sorry! I can go into the code and click the
   link to js.php file and it takes me there, but nothing is showing up. Sorry to
   be a problem child. Should I just wait for the update? And is it true the js 
   will load the testimonials faster? If not I can just go back to the shortcode
   possibly. Thank you!
 *  Plugin Author [Jeff K](https://wordpress.org/support/users/kreitje/)
 * (@kreitje)
 * [12 years ago](https://wordpress.org/support/topic/help-with-javascript-1/#post-4913026)
 * Hey Ann,
 * You do need to download the update as it fixes an issue specifically with the
   JavaScript. I believe WordPress checks for updates every 12 hours or so it should
   show up sometime soon.
 * The testimonials won’t load faster but your page might. Since they are far enough
   down the page they should get loaded before a visitor notices.
 * Jeff
 *  Thread Starter [spirittlk](https://wordpress.org/support/users/spirittlk/)
 * (@spirittlk)
 * [12 years ago](https://wordpress.org/support/topic/help-with-javascript-1/#post-4913031)
 * It works! Thank you – the new version is perfect!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Help with javascript’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/hms-testimonials.svg)
 * [HMS Testimonials](https://wordpress.org/plugins/hms-testimonials/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hms-testimonials/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hms-testimonials/)
 * [Active Topics](https://wordpress.org/support/plugin/hms-testimonials/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hms-testimonials/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hms-testimonials/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [spirittlk](https://wordpress.org/support/users/spirittlk/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/help-with-javascript-1/#post-4913031)
 * Status: resolved