
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2016 11:58 AM
I have a service catalog item that, based on xyz, will pull up a UI Page, in which I've perfectly matched the fields.
The following code works GREAT! with all fields except for those fields that are drop-downs (select box), that has a value of --None--
var items = document.getElementsByTagName('item');
var myField = '';
var myFieldID = '';
var field;
for (var i = 0; i < items.length; i++)
{
// Clear out all fields
myField = items[i].id;
myFieldID = '';
if (myField.length > 0)
{
myFieldID = ("IO:" + myField);
}
if (myFieldID.length > 0)
{
field = gel(myFieldID);
}
if (field)
{
field.value = '';
variableOnChange('IO:' + myField);
}
}
It clears out all the data, but will not put those darn slect boxes back to --None--
Any ideas?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2016 06:33 AM
I figured it out... and it's my fault. It was my code. Setting field.value = '' does indeed work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2016 12:14 PM
Hi David,
For the Select boxes, try setting the value to null instead.
Thanks,
-Brian

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2016 12:16 PM
Already tried that, but didn't work.
field.value = null;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2016 12:25 PM
Can you post the code from the UI Page that created the control? Let us see how it's setup.
-Brian

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2016 03:47 AM