Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Button text changing javascript
I've got a script that changes the text on an item's button based on the item's name. For us, most buttons say "Donate now" but some say "Sponsor me" and some are hidden.
It used to work fine, but I've been changing this on an item-by-item basis. Is there a way to reference an item's parent category in a client-side script? It'd be great if I could change the button if the item is a sub of a larger category (not web site category).
This is the script right now:
<script>
var aForm = document.forms;
for(var i=0;i<aForm.length;i++){
0