Title: Using script value in shortcode
Last modified: August 21, 2016

---

# Using script value in shortcode

 *  [stecmedia](https://wordpress.org/support/users/stecmedia/)
 * (@stecmedia)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/using-script-value-in-shortcode/)
 * Hi
    I am currently working on a site for a client, which needs a price generator.
   The pricing generator is javascript, and works like this: [Test version](http://ninjinx.me/booster.html)(
   View the code by using your browser’s source text function)
 * I would now like to take the chosen values and the result and add to the shortcode
   for my shop-plugin, which looks like this:
 * [wp_cart_button name=”VALUE 1 to VALUE 2″ price=”RESULT”]
 * [This](http://stefan-christensen.com/test/order-now-2/bundles/) is where the 
   shop is located, if you would like to view that as well.
 * The plugin is _WP Simple Paypal Shopping cart v3.8.5_
 * I hope this is the right forum, and thanks in advance. Just ask if you need more
   information, I’m here to get help 😉

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/using-script-value-in-shortcode/#post-4122918)
 * Javascript can only pass information back to the server and PHP via some HTTP
   request. Either as URL parameters for GET requests or as a data string for POST
   requests. Any cookie values are also passed with each request.
 * It’s not trivial, nor necessary, to insert data passed from javascript into shortcode
   attributes. The passed values will be directly available from $_REQUEST or it’s
   related super global arrays by the shortcode handler.

Viewing 1 replies (of 1 total)

The topic ‘Using script value in shortcode’ is closed to new replies.

## Tags

 * [cart](https://wordpress.org/support/topic-tag/cart/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [price](https://wordpress.org/support/topic-tag/price/)
 * [result](https://wordpress.org/support/topic-tag/result/)
 * [value](https://wordpress.org/support/topic-tag/value/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/using-script-value-in-shortcode/#post-4122918)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
