Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Place Short Code into Page from a JavaScript

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Place Short Code into Page from a JavaScript

Tagged: java variable to page, product purchase from javascript, Short code from Java variable to page

  • This topic has 2 replies, 2 voices, and was last updated 12 years ago by GWslade.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 26, 2013 at 10:50 pm #8998
    GWslade
    Member

    I have quite a unique situation

    I have a java script which recommends products. within the Java Script I have defined a variable which is the eStore buy now short code for the product being recommended.

    I am calling the Java Script from a IFrame within a page in WordPress

    I would like to have the Java Script return to the page with the short code to display the eStore buy now button in the page, after the recommendation has been made.

    This is a striped out version of the code in the Iframe, called from an HTML file with the Java embedded in the HTML.

    [admin deleted custom JS code after checking it]

    Any Suggestions how I can get the Java Variable to display the buy now button on the WordPress page?

    Thanks

    April 27, 2013 at 4:19 am #55318
    admin
    Keymaster

    Hi, You won’t be able to execute a shortcode from JavaScript like that.

    You might be able to get better result with this text link feature:

    https://support.tipsandtricks-hq.com/forums/topic/estore-how-to-use-a-text-link-to-accommodate-the-purchase-of-a-product

    You should be able to redirect the user to a particular link (that is a product purchase link) from your JavaScript code.

    April 29, 2013 at 5:22 pm #55319
    GWslade
    Member

    This is perfect, actually better than I could ask for, as it allows a link from outside the domain.

    Thanks so much

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ