• i made a java script code to get the price from a field and convert it from Egyptian to us dollars but it shows me the code as its text while if i copy the same code it works fine like the last Procedure filed.

    Java Script:
    // JavaScript Document

    var myTable = document.getElementById(“myTable”);

    var myPrice = myTable.getElementsByTagName(“td”);

    for ( i = 5; i < myPrice.length; i += 3){

    var x = i – 1;

    var myNum = myPrice[x].innerHTML;

    var myEditNumber = “[convert number=” + myNum + ” from=’egp’ to=’usd’] $”;

    var changeCurruncy = myPrice[i].innerHTML = myEditNumber;

    }

    window.alert (“Java is WORKING”);

    PLEASE ADVICE.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor David Artiss

    (@dartiss)

    Yeah – JavaScript will add the shortcode after the post has been written, so shortcodes will have been run by then. There isn’t an easy way to do this – what’s the reason for doing this in JavaScript?

    Thread Starter Saef Reyad

    (@safago)

    Hi, thanks for your reply.
    am doing this for a client and i want him to be able to change the prices if he needs so he will change the EGP and the $ will change accordingly.
    will VUE make a different?

    Thanks

    Plugin Contributor David Artiss

    (@dartiss)

    Sorry, I have no experience with vue.js

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Java Script’ is closed to new replies.