This content has been marked as final. Show 3 replies
I think you'd be better off keeping the script inside an external .js file, which you can then link to from any topic you want.
Thank You very much.
This might sound foolish, but I might have over estimated my programming knowledge. I am very new to programming and my role here at my company. My IT dept wrote a simple script to reference the 2 list boxes and depending on the results display that in the text box. They do not know how to create and call a .js file.
How do I code the script to reference the .js file? Any help would be greatly appreciated.
Here is the script I have that is currently inside the red box in RoboHelp:
var L1 = document.getElementById("s1");
var L2 = document.getElementById("s2");
var TA1 = document.getElementById("t1");
var str1 = "";
var str2 = "";
var str3 = "";
if ( L1.selectedIndex >= 0 && L2.selectedIndex >= 0 )
str1 = L1.options[L1.selectedIndex].text;
str2 = L2.options[L2.selectedIndex].text;
if ( str1 == "Individual" && str2 == "Individual")
str3 = "Both I"
else if ( str1 == "Individual" && str2 == "Corporate")
str3 = "I and C"
str3 = "The Common Answer for 95% of cases";
TA1.value = str3;