Hi,
I am trying to get a function working in Remedy to parse a field up as far as the last comma. e.g name1, name2, name3 - >
click the button once, output should be - name1, name2.
I have the following in the webheader -
<script type="text/javascript">
function backstep("arid_WIN_0_767700031") {
var fieldElement = document.getElementById("arid_WIN_0_767700031");
var oldFieldValue = fieldElement.value;
var indexOfDelimiter = fieldValue.lastIndexOf(",");
var newFieldValue = oldFieldValue.substring(0, indexOfDelimiter);
fieldElement.value = newFieldValue;}
</script>
I have an active link with the following
javascript backstep (document.getElementById("arid_WIN_0_767700031").value);
I am getting function not supported error 9369
Looking at the console debugger - I am also getting the following -
"unreachable code after return statement PopupSupport.js:1:139007
An unbalanced tree was written using document.write() causing data from the network to be reparsed. For more information https://developer.mozilla.org/en/Optimizing_Your_Pages_for_Speculative_Parsing"
Has anyone got any ideas? Thanks
I believe the logic should be sound as I was able to achieve the desired affect by using a slightly edited version of this code for a simple webpage that I setup with two input boxes, where the results of the parse from the text in one would get input in a second box