Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Checkbox and dropdown list box not working in Button event
I'm trying to set the value of the checkbox to false and the index of the dropdown list box to 0 when the button is pressed. Though the code snippet below works for text boxes, it doesn't work on dropdown list box and check boxes. It is easily achieved in clientscript using nlapiSetfieldValue but I'm coding it in server side script.
// The code for textbox works fine var btnEvent = "document.getElementById('textbox1').style.display='none';"; btnEvent += "document.getElementById('textbox2').style.display='none';"; btnEvent += "document.getElementById('textbox3').style.display='none';"; // The code for dropdown and checkbox does not trigger when the button is pressed btnEvent += document.getElementById('dropdownlistbox').selectedIndex=0;"; //btnEvent += "document.getElementById('dropdownlistbox').options(0).selected = true;"; //btnEvent += "document.getElementById('dropdownlistbox').options[0].selected = true;"; //btnEvent += "document.getElementById('dropdownlistbox').options[0].text = '';"; //btnEvent += "document.getElementById('checkbox').checked='false';"; // the btnEvent is supposed to reset the values of the objects as defined in the codes above form.addButton("custpage_new_authorization","Get New Authorization (Starry Temp)", btnEvent);