Avatar of Zantis
Zantis
 asked on

onChange="ShowReport_onclick()" Error

I have some code that when the drop down selection box is changed then it refreshes the page.  When I run this on internet explorer it says I have an object error, any ideas?

The first page at the top of the page in the head is this.....

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function ShowReport_onclick()
{      
      document.server.action = "task.asp?switch=11k11"
      document.server.submit();
}
//-->
</SCRIPT>


and the bottom code around the select statment is this...

                                                <form name="server" method="POST" action="task.asp?switch=11k11">

                                    <select name="idfTaskStatusID" size="1" style="FONT-SIZE: 8pt; FONT-FAMILY: Tahoma" onChange="ShowReport_onclick()">
                              <%
                              sql2 = "SELECT * FROM  tlkpTaskStatus ORDER BY tlkpTaskStatus.idpTaskStatusID;"

                                    SET PullDropDownRS = CONN.EXECUTE (sql2)
                                    DO WHILE NOT PullDropDownRS.EOF

                                    VidpTaskStatusID = Trim(PullDropDownRS.Fields("idpTaskStatusID"))
                                    VstrStatus = Trim(PullDropDownRS.Fields("strStatus"))
                                          '** Write out option **
                                          Response.Write "<option value=" & VidpTaskStatusID
                                 IF       VidfTaskStatusID = VidpTaskCategoryID THEN
                                            Response.Write " selected"      
                                    End If
                                          Response.Write ">" & VstrStatus
                                    
                                    PullDropDownRS.MOVENEXT
                                    LOOP
                                    PullDropDownRS.CLOSE
                                    %>  
                                    </select>
                  <input type=hidden name=idpTaskIndexID value="<%=VidpTaskIndexID%>">
                  </form>
ASP

Avatar of undefined
Last Comment
Cem Türk

8/22/2022 - Mon
Cem Türk

can you post HTML (View Source) version of your page so that i can figure the problem
Zantis

ASKER
<html>

<head>

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function ShowReport_onclick()
{      
      document.server.action = "task.asp?switch=11k11"
      document.server.submit();
}
//-->
</SCRIPT>


<script language=JavaScript>
function tierMenu(menu1,img1)
{
  var myElement = document.getElementById(menu1,img1);
  if (myElement.style.display == "none")
   {
    myElement.style.display = "";
    img1.src = "tierinclude/minus.gif";
   }
    else
   {
    myElement.style.display = "none";
    img1.src = "tierinclude/plus.gif";
   }
}
</script>


<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="description" content="">

<meta name="keywords" content="">
<title>trackyourmileage.com</title>
<!--###############################
//-Client: TrackYourMileage
//-Created by: www.ZantisWorks.com
//-Email: info@ZantisWorks.com
//-Date: 04.2005
//-Site-Section: trackyourmileage.com
//-Version: v.01
//-Multimedia Art Director: Jonathan Gagliardi
//-Email WebBuilder: design@zantisworks.com
//-Website: http://www.trackyourmileage.com
//###############################-->
</head>

<SCRIPT LANGUAGE="JavaScript">
      <!-- Begin
      browserName = navigator.appName;
      browserVer = parseInt(navigator.appVersion);

      ns3up = (browserName == "Netscape" && browserVer >= 3);
      ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

      function doPic(imgName)
            {
                  if (ns3up || ie4up)
                        {
                              imgOn = ("" + imgName);
                              document.mainpic.src = imgOn;
                        }
            }
      //  End -->
</script>

<body topmargin="0" leftmargin="0" background="images/addcatalog/piback.gif">



            

<div align="center">

<!--##############################################
//- PHOTO CATALOG DATE REQUEST
//################################################-->

<form method="POST" action="task.asp?switch=8a2&userid=1">
<table border="0" width="800" cellspacing="0" cellpadding="0">
        <tr>
      
            
          <td width="10%"><font face="Verdana" size="1"><b>Date:<br>
      </b></font><input style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma" maxLength="20" size="20" name="dtmFuelDate" value="9/13/2006 1:46:09 AM"></td>

          <td width="10"></td>
      <td width="10%"><font face="Verdana" size="1"><b>Due Date:<br>
      </b></font><input style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma" maxLength="9" size="9" name="dtmTaskDue"></td>
            <td width="10"></td>

                      <td width="10%"><font face="Verdana" size="1"><b>Category:<br>  </b>    
          
                              <select style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma" name="idfCategoryID" size="1"><font face="Tahoma" size="1">

                        <option value=1>Business - Web Design<option value=2>Business - Web Hosting<option value=3>Business - Computer Care<option value=4>Personal<option value=5>Business - Other  
                              </select>
                              </td>      
      <td width="10%"><font face="Verdana" size="1"><b>Task Description:<br>

      </b></font><input style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma" maxLength="75" size="75" name="strTaskDescription"></td>
            <td width="10"></td>
      <td width="10%"><font face="Verdana" size="1"><b>Notes:<br>
      </b></font><textarea style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma" rows="4" name="strTaskNotes" cols="20"></textarea></td>
            <td>
         <input type="submit" value="Submit" name="B1"><input type="reset" value="Undo" name="B2"> </td>
         </form>
        </tr>

</table>
</div>




<div align="center">
<table border="0" width="1000" id="table1">            
      <tr>
            <td>
                                          
                                    
                  <table height="10" border=1 cellspacing="0" cellpadding="0">

                        <tr>
                              
                              <td width="80" align="right" bgcolor=""> <font face="Verdana" size="1">

                                    &nbsp;9/13/2006&nbsp;
                              </td>                                                                                                                                                
                              <td width="150" align="right" bgcolor=""> <font face="Verdana" size="1">
                                    &nbsp;<select name="idfStationID" size="1" style="FONT-SIZE: 8pt; FONT-FAMILY: Tahoma">
                              <option value=3>Business - Computer Care<option value=5 selected>Business - Other<option value=1>Business - Web Design<option value=2>Business - Web Hosting<option value=4>Personal  
                                    </select>&nbsp;

                              </td>      
                              <td width="500" align="left" bgcolor=""> <font face="Verdana" size="2">
                                    Buy Tough Skin for Treo 700w
                                    <div onClick="tierMenu('costtier1',img1)">
                                    <IMG ID="img1" SRC="tierinclude/plus.gif">
                                    <FONT SIZE="2" face="Verdana" COLOR="#003399">Notes</FONT>
                                          
                                    </div>
                                    <div id=costtier1 style="padding:0px;display:none">
                                       <table border="0" height="300" width="100%" cellspacing="1" bordercolor="#CCCCCC" style="border-collapse: collapse" cellpadding="0" bgcolor="#CCCCCC">

                                                <tr>
                                                      <td>
                  
                                                 
                  
                                                      </td>
                                                </tr>
                                       </table>            
                                    </div>      
                                    
                              </td>                                    
                              <td width="80" align="right" bgcolor=""> <font face="Verdana" size="1">
                                    &nbsp;
                              </td>

                              <td width="100" align="right" bgcolor=""> <font face="Verdana" size="1">
                                                <form name="server" method="POST" action="task.asp?switch=11k11">

                                    <select name="idfTaskStatusID" size="1" style="FONT-SIZE: 8pt; FONT-FAMILY: Tahoma" onChange="ShowReport_onclick()">
                              <option value=1>Not Completed<option value=2>In Progress<option value=3>Completed  
                                    </select>
                  <input type=hidden name=idpTaskIndexID value="44">
                  </form>      
                              </td>                                          
                        </tr>

                  </table>


                                    
                              
                                                  
                                    
                  <table height="10" border=1 cellspacing="0" cellpadding="0">

                        <tr>
                              
                              <td width="80" align="right" bgcolor="#FFFFFF"> <font face="Verdana" size="1">

                                    &nbsp;9/9/2006&nbsp;
                              </td>                                                                                                                                                
                              <td width="150" align="right" bgcolor="#FFFFFF"> <font face="Verdana" size="1">

                                    &nbsp;<select name="idfStationID" size="1" style="FONT-SIZE: 8pt; FONT-FAMILY: Tahoma">
                              <option value=3>Business - Computer Care<option value=5>Business - Other<option value=1>Business - Web Design<option value=2>Business - Web Hosting<option value=4 selected>Personal  
                                    </select>&nbsp;
                              </td>      
                              <td width="500&quo