If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Get date value from an edit box date prompt

Started by kadams1869, 30 Oct 2009 01:49:05 PM

Previous topic - Next topic

kadams1869

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);