I'm trying to use Javascript to get the value from a date prompt so I can use a numeric value from a second prompt to apply business rules to populate 4 hidden prompts. This only requires the user to enter two values rather than 4 values.
The date prompt is an edit box and the name and parameter is rpt_strt_dt. Here is the code I'm using but its returning undefined.
I tried using a script I found on this site but the m_oSubmit was NULL or not an object.
function assignParamValue()
{
var dReportStartDate, iIDPrdLen;
var preProcessControlArray = document.getElementsByTagName("input");
for(var i=0; i<preProcessControlArray.length; i++)
{
var cntlName = eval(preProcessControlArray);
var cntlID = cntlName.id;
if(cntlID.indexOf("rpt_strt_dt")!=-1)
{
dReportStartDate = cntlName.value;
cntlName.value = 0;
}
}
iIDPrdLen = fW._oLstChoicesid_prd_len.value;
alert('dReportStartDate: ' + dReportStartDate);
alert('iIDPrdLen: ' + iIDPrdLen);