Here is what I have come up with for a fix.
I have figured out this issue. We had an IBI representative in last week and
this week, Jon Johnson. He suggested that I
make the selects using a JSON or XML input and build my select in a dynamic
function. I took his advice and output my
results in a JSON format. This allowed me to parse the data out myself and build
dynamic selects to work for IE9, IE11,
and Chrome. Here is a the code I used to output, and the code I used to
interpret it in my Javascript.
FEX CODE:
APP PATH diedm diedm_etl lookup
-RUN
DEFINE FILE DIEDM_DIM_BRANCH_REP
BRANCH_CODE_COMBINED/A4V=DIEDM_DIM_BRANCH_REP.BRANCH_CODE;
BRANCH_NAME_COMBINED/A40V=BRANCH_NAME_REPORTING;
END
TABLE FILE DIEDM_DIM_BRANCH_REP
BY BRANCH_CODE_COMBINED
BY BRANCH_NAME_COMBINED
WHERE ( DIEDM_DIM_BRANCH_REP.BRANCH_DETAIL_EXISTS_INDICATOR EQ 'Y' ) AND (
DIEDM_DIM_BRANCH_REP.BRANCH_CODE EQ ' 2' OR ' L' OR ' X' );
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE HOLD AS COMBINEDBRANCHES FORMAT ALPHA
END
-RUN
-*-------------------- create Companywide List Option
----------------------------------------
DEFINE FILE DIEDM_DIM_BRANCH_REP
BRANCH_CODE_COMBINED/A4V='4 ';
BRANCH_NAME_COMBINED/A40V='Companywide';
END
TABLE FILE DIEDM_DIM_BRANCH_REP
BY BRANCH_NAME_COMBINED
BY BRANCH_CODE_COMBINED
WHERE ( DIEDM_DIM_BRANCH_REP.BRANCH_CODE EQ ' B');
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE HOLD AS COMPANYWIDE FORMAT ALPHA
END
-RUN
-*-------------------- create individual Branches List
--------------------------------------
DEFINE FILE DIEDM_DIM_BRANCH_REP
BRANCH_NAME_COMBINED/A40V=BRANCH_NAME_REPORTING_DETAIL;
END
TABLE FILE DIEDM_DIM_BRANCH_REP
PRINT
COMPUTE BRANCH_CODE_COMBINED/A4V = IF
DIEDM_DIM_BRANCH_REP.BRANCH_CODE_REPORTING_DETAIL_PARAMETER IS MISSING THEN
DIEDM_DIM_BRANCH_REP.BRANCH_CODE ELSE
DIEDM_DIM_BRANCH_REP.BRANCH_CODE_REPORTING_DETAIL_PARAMETER;
BY BRANCH_NAME_COMBINED
WHERE ( DIEDM_DIM_BRANCH_REP.BRANCH_CODE NE '-1' );
ON TABLE HOLD AS INDIVIDUALBRANCHES FORMAT ALPHA
END
-RUN
TABLE FILE INDIVIDUALBRANCHES
BY BRANCH_NAME_COMBINED
BY BRANCH_CODE_COMBINED
WHERE (BRANCH_CODE_COMBINED NE ' X X')
WHERE (BRANCH_CODE_COMBINED NE ' X F')
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE HOLD AS INDIVIDUALBRANCHES FORMAT ALPHA
END
-*----------------------------------------- Combine both hold files
(COMBINEDBRANCHES and INDIVIDUALBRANCHES) ---------------
SET PAGE = NOLEAD
TABLE FILE COMBINEDBRANCHES
BY COMBINEDBRANCHES.BRANCH_NAME_COMBINED NOPRINT
BY COMBINEDBRANCHES.BRANCH_CODE_COMBINED
ON TABLE PCHOLD FORMAT JSON
MORE
FILE INDIVIDUALBRANCHES
MORE
FILE COMPANYWIDE
END
JAVASCRIPT TO READ INTO SELECT:
//----------------------------------------------------------Load Branch List
from IBI-------------------------------------------------------------------
function getBranchList() {
var _url = ajaxURL;
var _ibiapp = "diedm/ajax/";
var _procedure = "branch_list_NoVFC.fex";
$.ajax({
type: "GET",
url: _url + _ibiapp + _procedure,
dataType: "JSON",
success: function (output) {
var test = output.records;
for (key in test) {
if (test[key].BRANCH_NAME_COMBINED == 'Companywide') {
$("#BRANCH_CODE").append("<option value='_FOC_NULL'>" +
test[key].BRANCH_NAME_COMBINED + "</option>");
}
else {
$("#BRANCH_CODE").append("<option value=' " + test[key].BRANCH_CODE_COMBINED +
"'>" +
test[key].BRANCH_NAME_COMBINED + "</option>");
}
}
$("#BRANCH_CODE").val(BRANCH_CODE);
}
});
}
WebFOCUS 8105
Windows, All Outputs