• Resolved Imageenricotv

    (@enricotv)


    Hello,
    I’ve this js code in a shortcode:

    <script language=”Javascript”>
    document.cookie = “myJavascriptVar = ”
    today = new Date()
    document.write(today.getFullYear(),today.getMonth(),today.getDate(),today.getHours(),today.getMinutes(),today.getSeconds());
    </script>

    Now in CF7 with the Dynamic Text Extension plugin I can assign by default a value in a field obtaiden from the shortcode but in this field appair the entire code and not the result of the js code.
    Where is the problem?
    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Imagevaakash

    (@vaakash)

    Hi @enricotv,

    As I can understand, the entire code is displayed as-is instead of it getting executed?

    In this case, please use the “code editor”, make sure the angle brackets (< and >) are not “encoded”

    Thanks,
    Aakash

    Thread Starter Imageenricotv

    (@enricotv)

    Thanks Aakash,
    the code is as you see above, so the brackets <and> are as you see there, so I don’t understand why it doesn’t works. I had also tried to use & lt; for < and & gt; for > but didn’t works anyway.

    • This reply was modified 3 years, 10 months ago by Imageenricotv.
    • This reply was modified 3 years, 10 months ago by Imageenricotv.
    • This reply was modified 3 years, 10 months ago by Imageenricotv.
    Plugin Author Imagevaakash

    (@vaakash)

    Hi @enricotv,

    Ok then.. so when you say not working, can you please share more details?

    Since the code is written by users, shortcoder plugin or me have no idea about what is it or how it works.

    It would be better if you can test the code in an isolated page and debug what is happening.

    I would first suggest to look at the page source and see if the shortcode content inserted is correct.

    Thanks,
    Aakash

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

The topic ‘Javascript shortcode and dynamic text’ is closed to new replies.