cfcProgrammer
Programmer
Hi Everyone,
Please be patient with me, I'm very new to this HTML/ASP/Java Script world. My background is in RPG AS400. Two different development worlds all together.
I am simply trying to create a drop down box within HTML and validate the selection. I am getting an error stating that an "Object is expected".
Can someone help me figure out what it is that I am missing or not understanding about this coding technique?
Then on an on_click function of a button I am trying to validate the selection by running the following code. The form name is f1 and the selection is defaulted to display "Please select a report" this holds the value of -1.
Thanks in advance for any guidance you may be able to provide to me.
If I haven't included enough of the code to explain what it is I am trying to accomplish, I will post more.
Again Thank you for your help.
cfcProgrammer
Please be patient with me, I'm very new to this HTML/ASP/Java Script world. My background is in RPG AS400. Two different development worlds all together.
I am simply trying to create a drop down box within HTML and validate the selection. I am getting an error stating that an "Object is expected".
Can someone help me figure out what it is that I am missing or not understanding about this coding technique?
Code:
<table class=MsoNormalTable border=0 cellpadding=0 width=875 style='width:656.25pt;
mso-cellspacing:1.5pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
<td colspan=3 style='padding:.75pt .75pt .75pt .75pt'>
<h3 align=center style='text-align:center'><span style='mso-fareast-font-family:
"Times New Roman";color:black'><!-- Begin Layout Header --><!-- End Layout Header -->DFO
Reports<o:p></o:p></span></h3>
<div align=center>
<table class=MsoNormalTable border=1 cellpadding=0 width=434
style='width:325.25pt;mso-cellspacing:1.5pt;border:none;border-bottom:solid windowtext 1.0pt;
mso-border-bottom-alt:solid windowtext .5pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
<td width=146 valign=top style='width:109.85pt;border:none;padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal align=right style='text-align:right'><b><span
style='font-size:10.0pt;font-family:Arial;color:black'>Report Name:<o:p></o:p></span></b></p>
</td>
<td valign=top style='border:none;padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><a name="OLE_LINK1"></a><a name="OLE_LINK2"><span
style='mso-bookmark:OLE_LINK1'><span style='font-size:10.0pt;font-family:
Arial;mso-fareast-font-family:"Times New Roman";color:black'><SELECT NAME="lstReportName">
<OPTION VALUE="-1">---Please Select a Report---</option>
<option Value="1">Fish Status Report by Area</option>
<option Value="2">AIS Commercial Vessels</option>
<option Value="3">Summary of Patrol Hours by Fishery</option>
<option Value="4">Summary of Patrol Details by Area</option>
<option Value="5">Summary of Patrol Sightings – Fishing Vessels by Area</option>
<option Value="6">Aerial Surveillance Program—Program Result</option>
<option Value="7">Air Surveillance Program - Fixed Wing Aircraft—Monthly Totals</option>
<option Value="8">DFO Aerial Surveillance Program—SIS Usage By Month</option>
</SELECT><o:p></o:p></span></span></a></p>
Then on an on_click function of a button I am trying to validate the selection by running the following code. The form name is f1 and the selection is defaulted to display "Please select a report" this holds the value of -1.
Code:
function cmdShow_onclick() {
// Check for an entry in the Report field.
if f1.lstReportName.selectedIndex() ==-1{
Session("svError")="You <i>must</i> choose a REPORT to run";
Response.Redirect("/error.asp");
}
Thanks in advance for any guidance you may be able to provide to me.
If I haven't included enough of the code to explain what it is I am trying to accomplish, I will post more.
Again Thank you for your help.
cfcProgrammer