How to grab a multi-line CGI input into a variable

I'm trying to save the input from a CGI that pulls information from a database and throws it into an HTML file where ever the key <%ReportList%> is present.

I need to change some of the Directory paths in this list without really changing them in the file structure.

I've tried storing the data to a string and call the replace function but no matter how I store the output of the CGI it only grabs the first line.

Is this output a function of the CGI executable or is it from the Javascript?

Thanks in advance

--Mike

<!DOCTYPE HTML PUBLIC
 "-//W3C//DTD HTML 4.0 Transitional//EN"
 "http://www.w3.org/TR/REC-html40/loose.dtd">

<HTML>

<HEAD>
<TITLE><%Title%></TITLE>

<script language="JavaScript"><!--
<%LogonMessageContents%>
// --></script>

<script language="Javascript"><!--

gpd="<%Apd%>"
bparms="<%BrowserParms%>"
rcf="<%ReportCodeFilter%>"
sda="<%JavaScriptSelDateAppRpt%>"

function stdpopulate(form)
{
  with(form)
  {
    ReportCodeFilter.value = rcf;
    SelDateAppRpt.value = sda;
    Apd.value = gpd;
    BrowserParms.value = bparms;
  }
}

function stdsubmit(form)
{
  stdpopulate(form);
  form.submit();
}

function newWinAndSubmit(form)
{
  with (form) {
    target = "_blank"
    stdsubmit(form);
  }
}

function conditionalSubmit(form)
{
  var str = bparms;
  if (str.lastIndexOf("Frames=Y") == -1)
  {
    stdsubmit(form);
  }
  else
  {
    newWinAndSubmit(form);
  }
}

// --></script>


<form name="RptReturn" action="<%Protocol%>//Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top">
<input type="hidden" name="iAcqCmd" value="Back">
<input type="hidden" name="ReportPath" value="<%ReportPath%>">
<input type="hidden" name="AqlFile"    value="_ACQDEF_">
<input type="hidden" name="PageNumber" value="<%CurrentPageNumber%>">
<input type="hidden" name="ReportSet"  value="<%ReportSet%>">
<input type="hidden" name="Apd"        value="">
<input type="hidden" name="BrowserParms"  value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt" value="">
</form>

<form name="AppHeaderForm1" action="<%Protocol%>//Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top">
<input type="hidden" name="iAcqCmd" value="GetOpenReportDlg">
<input type="hidden" name="ReportSet"  value="<%ReportSet%>">
<input type="hidden" name="Apd"        value="">
<input type="hidden" name="BrowserParms" value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt" value="">
</form>


...........
...........
...........


    <!-- This table contains the app/reports list-->
    <table>
      <tr>
        <td valign="top">&nbsp;</td>
        <td align="left" valign="top" width="100%%">
      <FORM name = "HiddenData">
      <input type="hidden" name="ReportList" value="{<%ReportList%>}">
      </FORM>

      <SCRIPT LANGUAGE="JavaScript"><!--
            document.HiddenData.ReportList.value.replace(/ACQOTG/, "ACQPROD");
            // -->
      </SCRIPT>
DaedalusMCAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

smaccariCommented:
If you want to replace all paths ACQOTG by ACQPROD you have to use:

document.HiddenData.ReportList.value.replace(/ACQOTG/g, "ACQPROD");

Else you will replace only first match.

Is that the problem, or is there something else i did not catch?
0
ZvonkoSystems architectCommented:
Add the "g" modifier:

     <SCRIPT LANGUAGE="JavaScript"><!--
          document.HiddenData.ReportList.value.replace(/ACQOTG/g, "ACQPROD");
          // -->
     </SCRIPT>

0
DaedalusMCAuthor Commented:
I only wanted to modify the first instance.

The problem I'm having is when the CGI dumps the data for the <%ReportList%> variable it has multiple lines, only the first of which is stored in the variable to be searched.

I hope that helps out.

Thanks again.

--Mike
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

smaccariCommented:
Not sure to understand where lies the problem.
In the generated source code - in the browser - does the input ReportList contain all the data, or is it here that you have only the first line?
In this second case the problem lies in the CGI.
Else, you maybe need to replace all \r\n by nothing in your CGI variable.
0
DaedalusMCAuthor Commented:
Here is the HTTP Output - You can see where the CGI dumps the info into the HTML template.
I don't have access to change anything in the CGI app so I have to change the printed HTML
I marked it with a line of stars in the output below

If there is an easier way to just change the HTML code after it has been generated by the CGI that would be fine too.

Thanks,

--Mike



***************************
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Thu, 13 Apr 2006 20:54:00 GMT
Connection: close
Content-type: text/html

<!DOCTYPE HTML PUBLIC
 "-//W3C//DTD HTML 4.0 Transitional//EN"
 "http://www.w3.org/TR/REC-html40/loose.dtd">

<HTML>

<HEAD>
<TITLE>Open Report</TITLE>

<script language="JavaScript"><!--
//-- This function opens an alert box and fills
//-- it with the content inside the Logon Message file.
function PopupLogonMessageWindow() {
alert("       Welcome to the\n***Conversion ACquire Server***\n\n   If you have any problems\n     or questions email\n\n     idontcare@goaway.com\n\n           Thanks\n");
}

// --></script>

<script language="Javascript"><!--

gpd="qwqHlguaODk0nIG2iCGWorg7ALpBE50SY3jJz"
bparms="Frames=N      Bver=1"
rcf=""
sda="20040229"

function stdpopulate(form)
{
  with(form)
  {
    ReportCodeFilter.value = rcf;
    SelDateAppRpt.value = sda;
    Apd.value = gpd;
    BrowserParms.value = bparms;
  }
}

function stdsubmit(form)
{
  stdpopulate(form);
  form.submit();
}

function newWinAndSubmit(form)
{
  with (form) {
    target = "_blank"
    stdsubmit(form);
  }
}

function conditionalSubmit(form)
{
  var str = bparms;
  if (str.lastIndexOf("Frames=Y") == -1)
  {
    stdsubmit(form);
  }
  else
  {
    newWinAndSubmit(form);
  }
}

// --></script>


<form name="RptReturn" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top">
<input type="hidden" name="iAcqCmd" value="Back">
<input type="hidden" name="ReportPath" value="_ACQDEF_">
<input type="hidden" name="AqlFile"    value="_ACQDEF_">
<input type="hidden" name="PageNumber" value="1">
<input type="hidden" name="ReportSet"  value="\\ACQOTG\O$\ACQHNB\REPORTS">
<input type="hidden" name="Apd"        value="">
<input type="hidden" name="BrowserParms"  value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt" value="">
</form>

<form name="AppHeaderForm1" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top">
<input type="hidden" name="iAcqCmd" value="GetOpenReportDlg">
<input type="hidden" name="ReportSet"  value="\\ACQOTG\O$\ACQHNB\REPORTS">
<input type="hidden" name="Apd"        value="">
<input type="hidden" name="BrowserParms" value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt" value="">
</form>

<form name="AppHeaderForm2" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top">
<input type="hidden" name="iAcqCmd" value="GetFavoritesDlg">
<input type="hidden" name="ReportSet"  value="\\ACQOTG\O$\ACQHNB\REPORTS">
<input type="hidden" name="Apd"        value="">
<input type="hidden" name="BrowserParms" value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt" value="">
</form>

<form name="AppHeaderForm3" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top">
<input type="hidden" name="iAcqCmd"      value="GetOptionsDlg">
<input type="hidden" name="ReportPath"   value="_ACQDEF_">
<input type="hidden" name="CurrentPage"  value="1">
<input type="hidden" name="ReportSet"    value="\\ACQOTG\O$\ACQHNB\REPORTS">
<input type="hidden" name="Apd"          value="">
<input type="hidden" name="BrowserParms" value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt"  value="">
</form>

<form name="AppHeaderForm4" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top">
<input type="hidden" name="iAcqCmd" value="Logoff">
<input type="hidden" name="ResultsDir" value="//Icarus/conversion/results">
<input type="hidden" name="Apd"        value="">
<input type="hidden" name="BrowserParms" value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt" value="">
</form>

<form name="AppHeaderForm5" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top">
<input type="hidden" name="iAcqCmd"  value="GetAboutDlg">
<input type="hidden" name="ReportPath"  value="_ACQDEF_">
<input type="hidden" name="CurrentPage" value="1">
<input type="hidden" name="ReportSet"    value="\\ACQOTG\O$\ACQHNB\REPORTS">
<input type="hidden" name="Apd"         value="">
<input type="hidden" name="BrowserParms" value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt"  value="">
</form>

<script language="JavaScript"><!--

function cal_pf_form1(cmd, seldateapprpt, reportset, report_code_filter)
{
  var myform = document.forms.CalForm1;
  with (myform) {
    iAcqCmd.value  = cmd;
    ReportSet.value = reportset;
    // must set global variables so stdsubmit works
    rcf = report_code_filter;
    sda = seldateapprpt;
    stdsubmit(myform);
  }
}


function cal_pf_form2(reportpath, report_code_filter)
{
  var myform = document.forms.CalForm2;
  with (myform) {
    ReportPath.value = reportpath;
    // must set global variable so stdsubmit works
    rcf = report_code_filter;
    // Really don't want full path here, but don't want to create
    // more javascript to parse out what we need, so we'll send
    // what we have, and assume server will fix it for us.
    sda = reportpath;
    stdsubmit(myform);
  }
}

// --></script>

<form name="CalForm1" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST">
<input type="hidden" name="iAcqCmd" value="">
<input type="hidden" name="ReportSet"  value="">
<input type="hidden" name="Apd"        value="">
<input type="hidden" name="BrowserParms" value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt" value="">
</form>

<form name="CalForm2" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST">
<input type="hidden" name="iAcqCmd" value="OpenReport">
<input type="hidden" name="Apd"        value="">
<input type="hidden" name="BrowserParms" value="">
<input type="hidden" name="ReportCodeFilter" value="">
<input type="hidden" name="SelDateAppRpt" value="">
<input type="hidden" name="ReportPath" value="">
<input type="hidden" name="CurrentPage" value="1">
</form>

<script language="JavaScript"><!--

function SetCalParms(form)
{
  var monthStringLut = new Array(12);

  monthStringLut[0] = "01"
  monthStringLut[1] = "02"
  monthStringLut[2] = "03"
  monthStringLut[3] = "04"
  monthStringLut[4] = "05"
  monthStringLut[5] = "06"
  monthStringLut[6] = "07"
  monthStringLut[7] = "08"
  monthStringLut[8] = "09"
  monthStringLut[9] = "10"
  monthStringLut[10] = "11"
  monthStringLut[11] = "12"

  with (form)
  {
    var monthIndex = Month.selectedIndex
    var yearIndex  = Year.selectedIndex
    var dayIndex   = Day.selectedIndex

    var yearStr = Year.options[yearIndex].value
    var reportDate = yearStr + monthStringLut[monthIndex] + Day.options[dayIndex].value

    // Must set these global variables so that stdsubmit works. Note that
    // these variables, and stdpopulate() itself, are in the parent
    parent.rcf = ReportCodeFilter.value;
    parent.sda = reportDate;
    parent.stdpopulate(form)
  }

  return true;
}

function SubmitCalParms(form)
{
  if (SetCalParms(form))
  {
     parent.stdsubmit(form);
  }
}

function SetReportFilter(form)
{
  with (form)
  {
    // Must set these global variables so that stdsubmit works. Note that
    // these variables, and stdpopulate() itself, are in the parent
    parent.rcf = ReportCodeFilter.value;
    // parent.sda = reportDate;
    parent.stdpopulate(form)
  }

  return true;
}


function ApplyReportFilter(form)
{
  if (SetReportFilter(form))
  {
     parent.stdsubmit(form);
  }
}

function ClearReportFilter(form)
{
  form.ReportCodeFilter.value = "";
  if (SetReportFilter(form))
  {
     parent.stdsubmit(form);
  }
}

// --></script>



</HEAD>


<BODY bgcolor="#FFFFFF" text="#000000" link="#970045" vlink="#000080" alink="#000080" topmargin="0" onLoad="PopupLogonMessageWindow()">
  <table border="0" cellpadding="3" cellspacing="0" width="100%%"
    bgcolor="#DDDDDD" bordercolor="#FFFFFF" style="border-bottom: 1px solid rgb(255,255,255)">
    <tr>
    <td width="50%%" bgcolor="#DDDDDD" valign="middle"><font color="#000000" size="4" face="Arial">Open Report by Day</font></td>
      <td align="right" valign="bottom">
       
        <a href=javascript:parent.stdsubmit(parent.document.AppHeaderForm1)><font size="2" face="Arial">Reports</font></a>
        <font size="2" face="Arial"> <strong>·</strong> </font>
        <a href=javascript:parent.stdsubmit(parent.document.AppHeaderForm2)><font size="2" face="Arial">Favorites</font></a>
        <font size="2" face="Arial"> <strong>·</strong> </font>
        <a href=javascript:parent.stdsubmit(parent.document.AppHeaderForm3)><font size="2" face="Arial">Options</font></a>
        <font size="2" face="Arial"> <strong>·</strong> </font>
        <a href=javascript:parent.stdsubmit(parent.document.AppHeaderForm4)><font size="2" face="Arial">Logout</font></a>
        <font size="2" face="Arial"> <strong>·</strong> </font>
        <a href=javascript:parent.stdsubmit(parent.document.AppHeaderForm5)><font size="2" face="Arial">About</font></a>
        <font size="2" face="Arial"> <strong>·</strong> </font>
        <a href="../help.htm" target="_blank"><font size="2" face="Arial">Help</font></a>
      </td>
    </tr>
  </table>

<p><font size="3">To open a report select a date in the calendar and then click on one of the reports listed to the right of the calendar.</font></p>

  <!-- This table wraps the calendar and report list-->
  <table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td valign="top">
<!--Do not edit the following line!-->


<form name = "OpenReportDlg" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top" onSubmit="return SetCalParms(OpenReportDlg)">
  <input type="hidden" name="iAcqCmd" value="GetOpenReportDlg">
  <input type="hidden" name="Apd" value="">
  <input type="hidden" name="BrowserParms" value="">
  <input type="hidden" name="SelDateAppRpt" value="">
  <input type="hidden" name="ReportCodeFilter" value="">

    <!-- This table contains the calendar and controls below the calendar-->
    <table border="1" cellpadding="0" cellspacing="0">
    <tr>
      <td>
      <TABLE border='0' cellpadding='0' cellspacing='0'><TR><td align='center' colspan='7' width='175' bgcolor='#970045' nowrap>
<font color='#FFFFFF' size='3' face='Arial'>February 29, 2004</font></td></tr><TR><td align='center' colspan='7' width='175' bgcolor='#970045' nowrap>
<a href=javascript:parent.cal_pf_form1("FirstDayWithReports",20040229,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")><img src="../images/fmnthrpt.gif" alt="First day with reports" border="0" width="14" height="14"></a><a href=javascript:parent.cal_pf_form1("PrevMonthWithReports",20040229,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")><img src="../images/pmnthrpt.gif" alt="Previous month with reports" border="0" width="14" height="14"></a>&nbsp;&nbsp;<a href=javascript:parent.cal_pf_form1("TodaysDate",20040229,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")><img src="../images/today.gif" alt="Today's date" border="0" width="14" height="14"></a>&nbsp;&nbsp;<a href=javascript:parent.cal_pf_form1("NextMonthWithReports",20040229,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")><img src="../images/nmnthrpt.gif" alt="Next month with reports" border="0" width="14" height="14"></a><a href=javascript:parent.cal_pf_form1("LastDayWithReports",20040229,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")><img src="../images/lmnthrpt.gif" alt="Most recent day with reports" border="0" width="14" height="14"></a></td></tr><tr><td align='right' width='25' bgcolor='#EEEEEE'><font size='2' face='Arial'><strong>Su</strong></font></td><td align='right' width='25' bgcolor='#EEEEEE'><font size='2' face='Arial'><strong>Mo</strong></font></td><td align='right' width='25' bgcolor='#EEEEEE'><font size='2' face='Arial'><strong>Tu</strong></font></td><td align='right' width='25' bgcolor='#EEEEEE'><font size='2' face='Arial'><strong>We</strong></font></td><td align='right' width='25' bgcolor='#EEEEEE'><font size='2' face='Arial'><strong>Th</strong></font></td><td align='right' width='25' bgcolor='#EEEEEE'><font size='2' face='Arial'><strong>Fr</strong></font></td><td align='right' width='25' bgcolor='#EEEEEE'><font size='2' face='Arial'><strong>Sa</strong></font></td></TR><TR><TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040201,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>1</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040202,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>2</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040203,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>3</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040204,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>4</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040205,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>5</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040206,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>6</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040207,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>7</a></font></TD>
</TR><TR><TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040208,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>8</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040209,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>9</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040210,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>10</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040211,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>11</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040212,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>12</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040213,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>13</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040214,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>14</a></font></TD>
</TR>
<TR><TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040215,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>15</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040216,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>16</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040217,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>17</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040218,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>18</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040219,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>19</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040220,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>20</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040221,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>21</a></font></TD>
</TR>
<TR><TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040222,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>22</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040223,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>23</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040224,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>24</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040225,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>25</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040226,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>26</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040227,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>27</a></font></TD>
<TD align='right' width='25'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040228,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>28</a></font></TD>
</TR>
<TR><TD  align='right' width='25' bgcolor='#FF0000'><font size='2' face='Arial'><a href=javascript:parent.cal_pf_form1("GetOpenReportDlg",20040229,"\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>29</a></font></TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
</TR>
<TR><TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
<TD height='25'>&nbsp;</TD>
</TR>
</TABLE>
      </td>
    </tr>

    </table>
&nbsp;
    <table border="1" cellpadding="0" cellspacing="0">

    <tr>
      <td>
      <table border="0" width="175" bgcolor="#FFFFFF">
      <tr>
        <td><font size="2" face="Arial">Month:</font></td>
        <td><font size="2" face="Arial">Day:</font></td>
        <td><font size="2" face="Arial">Year:</font></td>
      </tr>
      <tr>
        <td><font size="2" face="Arial"><select name="Month" size="1">
            <option value="Jan"> Jan</option>
<option value="Feb" selected> Feb</option>
<option value="Mar"> Mar</option>
<option value="Apr"> Apr</option>
<option value="May"> May</option>
<option value="Jun"> Jun</option>
<option value="Jul"> Jul</option>
<option value="Aug"> Aug</option>
<option value="Sep"> Sep</option>
<option value="Oct"> Oct</option>
<option value="Nov"> Nov</option>
<option value="Dec"> Dec</option>

            </select></font></td>
        <td><font size="2" face="Arial"><select name="Day" size="1">
            <option value="01"> 1</option>
<option value="02"> 2</option>
<option value="03"> 3</option>
<option value="04"> 4</option>
<option value="05"> 5</option>
<option value="06"> 6</option>
<option value="07"> 7</option>
<option value="08"> 8</option>
<option value="09"> 9</option>
<option value="10"> 10</option>
<option value="11"> 11</option>
<option value="12"> 12</option>
<option value="13"> 13</option>
<option value="14"> 14</option>
<option value="15"> 15</option>
<option value="16"> 16</option>
<option value="17"> 17</option>
<option value="18"> 18</option>
<option value="19"> 19</option>
<option value="20"> 20</option>
<option value="21"> 21</option>
<option value="22"> 22</option>
<option value="23"> 23</option>
<option value="24"> 24</option>
<option value="25"> 25</option>
<option value="26"> 26</option>
<option value="27"> 27</option>
<option value="28"> 28</option>
<option value="29" selected> 29</option>
<option value="30"> 30</option>
<option value="31"> 31</option>

            </select></font></td>
        <td><font size="2" face="Arial"><select name="Year" size="1">
            <option value="1980"> 1980</option>
<option value="1981"> 1981</option>
<option value="1982"> 1982</option>
<option value="1983"> 1983</option>
<option value="1984"> 1984</option>
<option value="1985"> 1985</option>
<option value="1986"> 1986</option>
<option value="1987"> 1987</option>
<option value="1988"> 1988</option>
<option value="1989"> 1989</option>
<option value="1990"> 1990</option>
<option value="1991"> 1991</option>
<option value="1992"> 1992</option>
<option value="1993"> 1993</option>
<option value="1994"> 1994</option>
<option value="1995"> 1995</option>
<option value="1996"> 1996</option>
<option value="1997"> 1997</option>
<option value="1998"> 1998</option>
<option value="1999"> 1999</option>
<option value="2000"> 2000</option>
<option value="2001"> 2001</option>
<option value="2002"> 2002</option>
<option value="2003"> 2003</option>
<option value="2004" selected> 2004</option>
<option value="2005"> 2005</option>
<option value="2006"> 2006</option>
<option value="2007"> 2007</option>
<option value="2008"> 2008</option>
<option value="2009"> 2009</option>
<option value="2010"> 2010</option>

            </select></font></td>
      </tr>
      <tr>
        <td colspan="3"><font size="2" face="Arial">Drive:
            <select name="ReportSet" size="1">
              <option value="\\acqotg\o$\ACQHNB\REPORTS" selected> JUKEBOX</option>
<option value="Z:\TEMP\REPORTS"> TEST</option>
<option value="\\Hd-htgl19f\BuckSixty\ACQARC\REPORTS"> BUCKSIXTY</option>
<option value="\\acquire-pr\s$\ACQUATE\REPORTS"> U8</option>
<option value="C:\ACQARC\REPORTS"> ICARUS</option>
<option value="\\acqotg\jukebox\reports"> TESTING123</option>

            </select></font></td>
      </tr>
      <tr>
        <td align="center" colspan="3" bgcolor="#EEEEEE"><input type="button" value="Update" onclick="javascript:SubmitCalParms(document.OpenReportDlg)"></td>
      </tr>
      </table>
      </td>
    </tr>
    </table>
</form>

<form name = "ReportFilterDlg" action="http://Icarus/conversion/cgi-bin2/iacquire.exe" method="POST" target="_top" onSubmit="return SetReportFilter(ReportFilterDlg)">
  <input type="hidden" name="iAcqCmd" value="ApplyReportFilter">
  <input type="hidden" name="Apd" value="">
  <input type="hidden" name="BrowserParms" value="">
  <input type="hidden" name="ReportSet" value="\\ACQOTG\O$\ACQHNB\REPORTS">
  <input type="hidden" name="SelDateAppRpt" value="">

  <table border="1" cellpadding="0" cellspacing="0">
      <tr>
      <td>
      <table border="0" width="175" bgcolor="#FFFFFF">
      <tr>
        <td colspan="3"><font size="2" face="Arial">Report Filter:
            <input type="edit" name="ReportCodeFilter" value="">
        </font></td>
      </tr>
      <tr align="center">
        <td align="center" colspan="3" bgcolor="#EEEEEE">
          <input type="button" value="Scan" onclick="javascript:ApplyReportFilter(document.ReportFilterDlg)">
          <input type="button" value="Clear" onclick="javascript:ClearReportFilter(document.ReportFilterDlg)">
        </td>
      </tr>
      </table>
      </td>
      </tr>
  </table>
</form>

    </td>
    <td valign="top">&nbsp;</td>
    <td align="left" valign="top" width="100%%">
    <!-- This table contains the app/reports list-->
    <table>
      <tr>
        <td valign="top">&nbsp;</td>
        <td align="left" valign="top" width="100%%">
      <!-- ReportList - Start      -->
*******************************************************************************************************************
      <FORM name = "HiddenData">
      <input type="hidden" name="ReportList" value="<TABLE border='0' cellpadding='0' cellspacing='0'>
<TABLE border='0' cellpadding='0' cellspacing='0'>
<TR>
  <TD><img src="../images/topopen.gif" alt="Top"></TD>
  <TD><font size='2' face='Arial'><b>\\ACQOTG\O$\ACQHNB\REPORTS</b></font></TD>
</TR>
</TABLE>
<TABLE border='0' cellpadding='0' cellspacing='0'>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\AM","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>AM-ADVANCED LOANS</a></font></TD>
</TR>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\ATM","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>ATM-MPS REPORTS</a></font></TD>
</TR>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\ATS","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>ATS-TOTALS SYSTEMS</a></font></TD>
</TR>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\CML","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>CML-COMMERCIAL LOAN</a></font></TD>
</TR>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\IM","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>IM - IMPACS </a></font></TD>
</TR>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\KC","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>KC-KNOW YOUR CUST</a></font></TD>
</TR>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\OP","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>OP-COMPUTER OPS</a></font></TD>
</TR>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\PEP","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>PEP-PLUS</a></font></TD>
</TR>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\RM","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>RM - CUST INFO SYST </a></font></TD>
</TR>
<TR>
  <TD><img src="../images/t.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\RP","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>RP- ACCOUNT RECON</a></font></TD>
</TR>
<TR>
  <TD><img src="../images/l.gif" alt="T-Link"></TD>
  <TD><img src="../images/foldericon.gif" alt="Folder"></TD>
  <TD><font size='2' face='Arial'>&nbsp;<a href=javascript:parent.cal_pf_form1("GetOpenReportDlg","20040229\\V3","\\\\acqotg\\o$\\ACQHNB\\REPORTS","")>V3 - VECTOR 3</a></font></TD>
</TR>
</TABLE></TABLE>">
      </FORM>

      <SCRIPT LANGUAGE="JavaScript"><!--
            document.HiddenData.ReportList.value.replace(/ACQOTG/, "ACQPROD");
            // -->
      </SCRIPT>

      <!-- ReportList -->
      <!-- ReportList - Stop      -->
        </td>
      </tr>
    </table>

    </td>
  </tr>
  </table>
<p align="center"><font face="Times New Roman"><img
src="../images/acquire_icon3.jpg" alt="ACquire" width="32"
height="32"></font><font size="2" face="Times New Roman">ACquire<br>
</font><font size="2" face="Times New Roman">Copyright
&copy; 2000-2003</font><font size="2" face="Times New Roman"><br>
Fidelity Information Services, Inc.<br>
All Rights Reserved</font></p>

</BODY>
</HTML>
0
smaccariCommented:
Ok so you really have to replace all \r\n of your variable ReportList, CGI side, so as all HTML code in it will be placed in one single line.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.