ScottInTexas
06-25-2004, 02:51 PM
This code has been running for at least a couple of years and suddenly it is throwing an "Object Required" error. The error only occurs when the mouse moves quickly over an element on the web page. The elements are drop downs. The javascript function is called via document.onmouseover = rollon
Here is the javascript.
function rollon() {
var myEvent;
myEvent = window.event.srcElement;
if (myEvent.className == 'menuitem') {
The if statement is the line throwing the error.
This is the area on the web page that is generating the call that throws the error.
<form method="POST" action="submitrequest_save.asp" onsubmit="return FormValidator(this)" name="RequestForm">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr><td>Submit Travel Approval Request</td></tr>
<tr>
<td width="30%" height="22">Budget Charged</td>
<td colspan="7" width="342" height="22">
<select size="1" id="BudgetCharged" tabindex="6">
<option selected>Choose One</option>
<option>LHC Tech Center</option>
<option>Project</option>
<option>Other Dow Biz</option>
<option>Outside Dow</option>
</select>
<input type="hidden" id="budget" name="budget" value></td>
</tr>
<tr>
<td width="30%" height="22">Amount (USD)</td>
<td colspan="7" width="342" height="22">
<input type="text" id="6" name="OrigRequestValue" size="20" tabindex="7"></td>
</tr>
<tr>
<td width="30%" height="22">1st Reviewer</td>
<td colspan="7" width="342" height="22">
<%
vSQL="Select * from [trefPeople];"
Set oRSdrp = Server.CreateObject("ADODB.Recordset")
' open recordset
oRSdrp.Open vSQL, oConn, adOpenDynamic
oRSdrp.Find "UserID='" & session("uid") & "'"
Apprvr=oRSdrp("FirstApprover")
oRSdrp.Close
vSQL="Select UserID, Name from [trefPeople] WHERE Lname='" & apprvr & "'"
oRSdrp.Open vSQL, oConn, adOpenDynamic
%><input type="hidden" id="7" name="ApproveID" tabindex="8" value="<% =oRSdrp("UserID") %>">
<input type="text" name="appName" value="<% =oRSdrp("Name") %>" disabled="false">
<%
oRSdrp.Close
Set oRSdrp=Nothing
%>
</td>
</tr>
</table>
Some of the table was left out for brevity, but I wanted to make sure I included enough so you could see clearly what was going on.
Thanks for your help
Here is the javascript.
function rollon() {
var myEvent;
myEvent = window.event.srcElement;
if (myEvent.className == 'menuitem') {
The if statement is the line throwing the error.
This is the area on the web page that is generating the call that throws the error.
<form method="POST" action="submitrequest_save.asp" onsubmit="return FormValidator(this)" name="RequestForm">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr><td>Submit Travel Approval Request</td></tr>
<tr>
<td width="30%" height="22">Budget Charged</td>
<td colspan="7" width="342" height="22">
<select size="1" id="BudgetCharged" tabindex="6">
<option selected>Choose One</option>
<option>LHC Tech Center</option>
<option>Project</option>
<option>Other Dow Biz</option>
<option>Outside Dow</option>
</select>
<input type="hidden" id="budget" name="budget" value></td>
</tr>
<tr>
<td width="30%" height="22">Amount (USD)</td>
<td colspan="7" width="342" height="22">
<input type="text" id="6" name="OrigRequestValue" size="20" tabindex="7"></td>
</tr>
<tr>
<td width="30%" height="22">1st Reviewer</td>
<td colspan="7" width="342" height="22">
<%
vSQL="Select * from [trefPeople];"
Set oRSdrp = Server.CreateObject("ADODB.Recordset")
' open recordset
oRSdrp.Open vSQL, oConn, adOpenDynamic
oRSdrp.Find "UserID='" & session("uid") & "'"
Apprvr=oRSdrp("FirstApprover")
oRSdrp.Close
vSQL="Select UserID, Name from [trefPeople] WHERE Lname='" & apprvr & "'"
oRSdrp.Open vSQL, oConn, adOpenDynamic
%><input type="hidden" id="7" name="ApproveID" tabindex="8" value="<% =oRSdrp("UserID") %>">
<input type="text" name="appName" value="<% =oRSdrp("Name") %>" disabled="false">
<%
oRSdrp.Close
Set oRSdrp=Nothing
%>
</td>
</tr>
</table>
Some of the table was left out for brevity, but I wanted to make sure I included enough so you could see clearly what was going on.
Thanks for your help