Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

PS2013 - Change the custom fields names in PDP

$
0
0

Hi All,

I've got the following code to insert in a content editor webpart for changing a custom field name in a PDP, but I cannot make it work and since I'm not a developer, I cannot tweek it.

<script type="text/javascript">
    var old_name = "OldName";
    var new_name = "NewName";
    var ttnA = document.getElementsByTagName("div");
    for (var j = 0; j < ttnA.length; j++) {
        var orig = ttnA[j].innerHTML;
        var stripped = orig.replace(/^\s*/, "").replace(/\s*$/, "");
        if (stripped == old_name) {
            ttnA[j].innerHTML = new_name;
        }
    }</script>

Can someone help?

Thanks in advance!


Hope this helps,


Guillaume Rouyre, MBA, MVP, P-Seller |


Viewing all articles
Browse latest Browse all 5347

Trending Articles