Hi,
I've created 2 custom fields with following code:
<script type="text/javascript">
var source = document.getElementById("customfield_00001");
var dest = document.getElementById("customfield_00002");
source.onchange = function()
{
var selectedText = source.options[source.selectedIndex].text;
if (selectedText == 'option1') {dest.value = 'Destination';}
else {dest.value = 'option2';}
alert(source.options[source.selectedIndex].text);
};
</script>
Check that it works on IE 8 and Firefo (V12) most of the time.
If I change project (first field on the screen), the java script does not work sometimes.
Need to know:
1. What is the proper way to write java script that compatible to chrome, ie and firefox?
2. Tried some of the jquery options found on the internet and it doesn't seems working.
3. Not sure why it doesn't work on chrome (v28).
I'm using JIRA Version (v6.0#6095-sha1:601557e)
Thanks in advance.