Results 1 to 8 of 8

Thread: DD Tab Script - Object Required Error

  1. #1
    Join Date
    Aug 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DD Tab Script - Object Required Error

    1) Script Title: DD Tab Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm

    3) Describe problem: I'm getting an "Object required" error in IE when running this script.

    The script runs fine in a stand-alone mode (see http://www.ni-econdev.com/sitesearch.asp?p=gledc) but when it is incorporated into an iframe the error pops up. (see http://www.gledc.com/available.asp). I should note that the script runs fine in the initial iteration but breaks down when trying to follow a link in the iframe window. The line of code indicated as the culprit is document.getElementById(cid).style.display="block"

    The script executes fine in Firefox and a check of the javascript consolde indicates no problems.

    Any advice?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,076
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    There are a couple of css errors reported in FF, in IE and FF though, it works fine here (even in the iframe) with no script errors reported. Are you using IE 7 or possibly IE Mac?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm using IE 6.0.

    Here's what's puzzling about the problem I have. If you open the standalone page first, then the iframes page will open later. If you close and repopen your browser and open the iframes page first, then the error occurs. If I knew much about javascript I could probably figure this out. It seems that a variable is being lost in the iframes environment that isn't lost otherwise. Once the non-iframes page is run, then the variable is retained in javascript and is available later when the iframes page is opened. By the way, just to be clear, the iframes problem occurs a couple steps in. Open the page, search for properties and the error pops up when clicking on a property link to see detailed information.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,076
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Why didn't you say so in the first place? Anyways, the error I got was:

    Code:
    line: 34
    char: 1
    Object required
    Code: 0
    URL: http://www.ni-econdev.com/sitesearch.asp?
    Since that page isn't even on your site, you have no way of fixing it yourself. You could report it to the site's webmster and/or owner.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,076
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Ah, looking back at your initial post, it appears as though you may have control over that page. In that case try:

    Code:
    if (cid&&document.getElementById(cid))
    document.getElementById(cid).style.display="block"
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Aug 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your advice. I've tried to implement your suggestion but it doesn't help. It just seems that in the iframes environment that values for javascript variables are being forgotten as the script processes. Any further thoughts?

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,076
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    I would think that if that is the case, implementing the suggestion should have at least gotten you a new error, did it?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Aug 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes and no. No javascript errors occur but the page that should display is not displayed and a vbscript error occurs after returning about 1,000 incorrect results of the original search. Keep in mind that the asp script and the dd menu work fine until put into the iframes page and also work fine in firefox. It's only in IE (6.0) and inside an iframe that any problems occur. I appreciate you continuing to follow my dilemma. Thanks!

Bookmarks

Posting Permissions

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