• Resolved knubew

    (@knubew)


    Hello Artem,

    I’ve read your FAQ, but I cannot find an answer to my problem.

    I need to run a JS-Snippet with a function that uses two attributes (“att_1” and “att_2”). Is that possible?

    Shortcode in page:
    [wbcr_js_snippet id="3892" title="JS test snippet" att_1="TEST-1" att_2="TEST-2"]

    For this I simplify the code. The following JS snippet works fine, when I run it WITHOUT using attributes:
    document.write("TEST-1" + "<br>" + "TEST-2");

    Please can you give me a working example for this code with the two attributes (“att_1” and “att_2”)?

    Best regards

    • This topic was modified 5 years ago by knubew.
    • This topic was modified 5 years ago by knubew.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support Temyk

    (@webtemyk)

    Hi.

    Unfortunately, Woody doesn’t currently support attributes in JS snippets. We will definitely add this feature in the next update.

    In the meantime, you can manually add the necessary parameters. This is the code in the post text:

    <script>
    var att_1 = "TEST-1";
    var att_2 = "TEST-2";
    </script>
    [wbcr_js_snippet id="3892" title="JS test snippet"]

    In the snippet, just use these variables.

    Thread Starter knubew

    (@knubew)

    Hi Artem,

    thank you very much for the workaround.

    Unfortunately, Woody doesn’t currently support attributes in JS snippets. We will definitely add this feature in the next update.

    Yeah, that feature would be very, very nice!

    Best regards

    Thread Starter knubew

    (@knubew)

    Hello Artem,

    Unfortunately, Woody doesn’t currently support attributes in JS snippets. We will definitely add this feature in the next update.

    Does the very new version 2.3.2 support attributes in JS snippets?

    Plugin Support Temyk

    (@webtemyk)

    Hi.

    Yes, now JS snippets support attributes

    Thread Starter knubew

    (@knubew)

    Wow, thant’s great. Thank you very much.

    I think, it’s worth to list this nice new feature in the changelog.

    Plugin Support Temyk

    (@webtemyk)

    I think, it’s worth to list this nice new feature in the changelog.

    This is already in the changelog ??

    Thread Starter knubew

    (@knubew)

    This is already in the changelog

    Sorry, I overlooked that.

    I’ve just installed the very new version 2.3.3 and I will test the new functionality. Hopefully I can throw the “workaround code” overboad in my project, now.

    Thread Starter knubew

    (@knubew)

    Hi Artem,

    “attributes in JS snippets” are working perfect.
    I’ve removed all my workaround code already.

    Thank you very much.

    Thank you Knubew for helping us!
    Would you like to do an interview on Woody and help us improve it?

    Thread Starter knubew

    (@knubew)

    Hi Serg,

    Would you like to do an interview on Woody and help us improve it?

    Yes – sure.
    But my English is far away from being perfect. ??

    Ok, it’s convenient for you to communicate in Slask or maybe in Fasebook?

    Thread Starter knubew

    (@knubew)

    Ok, it’s convenient for you to communicate in Slask or maybe in Fasebook?

    I’m sorry, but I neither use Slack, nor Facebook.

    Is it possible to send your question via E-Mail to me?

    If “yes”, I could send you my email address to you. Which email address should I send it to?

    My profile has an email, can you write to it?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Can’t get a JavaScript Snippet (JS) run with attributes’ is closed to new replies.