Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    567
    Thanks
    2
    Thanked 4 Times in 4 Posts

    Suddenly an error - object required

    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.

    Code:
    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.

    Code:
    <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
    Scott Stewart
    Always happy to learn from pros.

  • #2
    Regular Coder
    Join Date
    Jun 2004
    Location
    underground
    Posts
    186
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why are you assigning onmouseover to the entire document for this?

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Posts
    567
    Thanks
    2
    Thanked 4 Times in 4 Posts
    This file was written by someone else. Apparently it is supposed to check every element on a page and make sure it is not a menuItem. This one file is for all web pages within the global web site. The menu is is also a global menu. In any case I have to work with it. I would've thought there was a better way to do it.
    Scott Stewart
    Always happy to learn from pros.

  • #4
    Regular Coder
    Join Date
    Jun 2004
    Location
    underground
    Posts
    186
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ScottInTexas
    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.
    Tell me, ScottInTexas:
    From the example you've provided, can one readily copy and paste the code to observe said error?

    You might be better assisted by removing irrelevant ASP data, providing an enclosed script, and testing the example so that one can see what's happening, without having to guess at the actual configuration.

  • #5
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by neofibril
    Tell me, ScottInTexas:
    From the example you've provided, can one readily copy and paste the code to observe said error?

    You might be better assisted by removing irrelevant ASP data, providing an enclosed script, and testing the example so that one can see what's happening, without having to guess at the actual configuration.
    Or perhaps provide the rendered page codes.
    (view source after the page is parsed and post that)

  • #6
    Regular Coder
    Join Date
    Nov 2002
    Posts
    567
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Thanks for the replies. The problem was that I had a text box disabled. It appears that whenever the mouse rolled over that particular text box fast, the error was thrown by the if statement in the javascript. I unlocked the text box and can no longer generate the error.

    I appologize for making this difficult by not including more of the code. One of the problems here is that nearly the entire intranet is filled with secret stuff and it is difficult to post without compromising security. If I cut and paste then change things so the security is maintained, I wont have an accurate picture of the truth so the post would be moot.

    I appreciate your help anyway. Hope I can return the favor.
    Scott Stewart
    Always happy to learn from pros.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •