troubleshooting Question

onChange="ShowReport_onclick()" Error

Avatar of Zantis
Zantis asked on
ASP
9 Comments1 Solution390 ViewsLast Modified:
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>
ASKER CERTIFIED SOLUTION
Cem Türk
Senior Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros