Title: use shortcode in javascript function
Last modified: August 21, 2016

---

# use shortcode in javascript function

 *  [keerthy](https://wordpress.org/support/users/keerthy/)
 * (@keerthy)
 * [12 years ago](https://wordpress.org/support/topic/use-shortcode-in-javascript-function/)
 * am using shortcode inside javascript it is working fine.
    when i am suppose to
   send dynamic parameter to that shortcode it is taking that dynamic parameter 
   as string . it is not going properly .how can i use it.
 * example:(inside javascript)
    var x= 1; “[shortcode text=1]” it is going properly“[
   shortcode text=” + x + “]” this not taking parameter as 1, it is taking as + 
   x+;
 * please give me a solution
 * [https://wordpress.org/plugins/shortcode-exec-php/](https://wordpress.org/plugins/shortcode-exec-php/)

The topic ‘use shortcode in javascript function’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shortcode-exec-php.svg)
 * [Shortcode Exec PHP](https://wordpress.org/plugins/shortcode-exec-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcode-exec-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcode-exec-php/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcode-exec-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcode-exec-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcode-exec-php/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [keerthy](https://wordpress.org/support/users/keerthy/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/use-shortcode-in-javascript-function/)
 * Status: not resolved