Hello,
I'm trying to troubleshoot some javascript written by someone else that is no longer contracting with the company.
There is an interactive report with a column link. This link has a "save" button that calls a javascript function
and passes values to it. The javascript function sets page item values and submits the page. This has supposedly been working for several months
but has "stopped", meaning that if a value (e.g., STATUS) for a column in the IR is changed and the save button clicked, the database is not updated.
I think that the value of the item (P19_STATUS) may not be getting set correctly because the variable (v_status) is not building the ID correctly but I have not been able to insert an alert into the code in order to see the values.
How can I see the value of v_status to make sure it is being set correctly?
HTML Header:
<script language="JavaScript" type="text/javascript">
function resetValues()
{
document.getElementById('P19_LINE_NUM').value = '' ;
document.getElementById('P19_STATUS').value = '' ;
document.getElementById('P19_RESPONSIBILITY').value = '';
document.getElementById('P19_MESSAGE').value = '';
document.getElementById('P19_CLAIM_CK').value = '';
document.getElementById('P19_FILE_DT').value = '';
}
function setStatus( CLAIM_CK , LINE_NUM, FILE_DT )
{
document.getElementById('P19_LINE_NUM').value = LINE_NUM ;
document.getElementById('P19_CLAIM_CK').value = CLAIM_CK;
document.getElementById('P19_FILE_DT').value = FILE_DT;
v_status = "f01_" + CLAIM_CK + LINE_NUM + FILE_DT ;
v_resp = "f02_" + CLAIM_CK + LINE_NUM + FILE_DT ;
v_msg = "f03_" + CLAIM_CK + LINE_NUM + FILE_DT ;
document.getElementById('P19_STATUS').value = document.getElementById(v_status).value;
document.getElementById('P19_RESPONSIBILITY').value = document.getElementById(v_resp).value;
document.getElementById('P19_MESSAGE').value = document.getElementById(v_msg).value;
doSubmit('SUBMIT');
return true;
}
function refresh()
{
window.location.reload();
}
</script>
Here is the Page HTML Body Attribute:
onLoad="javascript:resetValues();" onSubmit="javascript:refresh();"
The Link Attribute of the Column Link:
onClick="javascript:setStatus( #CLAIM_CK#, #LINE_NUM#, #FILE_DT#);"
The link passes these values:
#CLAIM_CK# to P19_CLAIM_CK
#LINE_NUM# to P19_LINE_NUM
#FILE_DT# to P19_FILE_DT
and redirects to the same page.
The pl/sql works as it should when run in a command window with the appropriate values.
Thank you for any help.
Matt