Results 1 to 10 of 10

Thread: Still Stumped...Anyone bored enough to help?

  1. #1
    Join Date
    Jun 2005
    Location
    San Jose, CA (home); Rochester, NY (school)
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Still Stumped...Anyone bored enough to help?

    I'm still trying to work out the problem I posted about last week here:

    http://www.dynamicdrive.com/forums/s...ead.php?t=3818

    I can't find the contradiction that's causing the problem. I know it's a ton of code but if anyone is willing to look over it, I will be eternally grateful and if you're ever in the Rochester area I will make you cookies.

    -Stephanie

  2. #2
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    what exactly is wrong?
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  3. #3
    Join Date
    Jun 2005
    Location
    San Jose, CA (home); Rochester, NY (school)
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I describe it in depth and have a link to the code (both the original on this site and the page I'm trying to implement it on) on the original post. Brief summary: When I try to drag and drop the popup box the cursor gets stuck in the middle of the top bar and won't release the window, the result being that unless you refresh the page you just have the window following your cursor around the screen.

  4. #4
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hmmm....your site looks fine to me...
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  5. #5
    Join Date
    Jun 2005
    Location
    San Jose, CA (home); Rochester, NY (school)
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by IanMarlowe
    hmmm....your site looks fine to me...

    Weird. Mind telling me what platform/browser you're using?

  6. #6
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ie 5...
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    10 to 1 will get you that it is the image map. Those things can cause all sorts of trouble with scripts. At the very least, try putting the coords info directly after this:
    Code:
    <img src="../graphics/cabinet-doors/applied-moulding/appliedmoulding.jpg" usemap="#appliedmoulding_Map" border="0">
    You are not supposed to have all that stuff in between. If that doesn't get it, try an experiment with just an image, instead of a map.
    - John
    ________________________

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

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Ah, it is a script conflict (I took the other scripts off the page and it worked fine):

    Note: Questions regarding multiple script usage are not usually replied to due to their time consuming nature. See this thread for more information, and this tutorial for one possible solution.

    Aside from the tutorial above, which usually is the solution when the problem is two different scripts, you may need to consult:

    http://www.howtocreate.co.uk/tutoria...allshow#refcon

    Which explains how two scripts on the same page may not use the same set of variable names, id names, etc. This is especially important if the problem is two copies of the same script on a page but, can come into play with two different scripts when the first step won't fix it.

    One other approach that works in both situations, if adaptable to one (or more) of the scripts, is to put one script in a borderless iframe. It will look like it is on the same page but, since it really is on a separate page, conflicts are no longer an issue.

    Also, I notice you have combined a script with the viewer script. At least keep them separate.
    - John
    ________________________

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

  9. #9
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The Macromedia script that creates your menus is rather antisocial and blindly assigns a listener to the onmouseup property of the document object[1]. This overwrites the listener used by the drag 'n drop script, and hence your problem. To solve this, you'll need to do a bit of restructuring.

    First, move the script element that includes the Macromedia script so that it's the first script element in the document. Whilst you're at it, remove the language attribute from the starting tag (specifying "Javascript1.2" is bad idea).

    Second, delete the script element that calls mmLoadMenus, currently located at the start of the body element.

    Third, move the large inline script element into the body element (where the previous one was), and call mmLoadMenus just after it's defined in that block.

    Finally, at the end of that script block, replace:

    Code:
    document.onmouseup=new Function("dragapproved=false")
    with:

    Code:
    document.oldmouseup = document.onmouseup;
    document.onmouseup = function() {
      if(this.oldmouseup) {this.oldmouseup();}
    
      dragapproved = false;
    };
    A nasty hack, but it should work.

    Good luck,
    Mike


    [1] The drag 'n drop script does too, but you'd expect more from an international corporation. Well, not really I suppose; it is Macromedia

  10. #10
    Join Date
    Jun 2005
    Location
    San Jose, CA (home); Rochester, NY (school)
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well it didn't actually end up working. (I probably misunderstood something somewhere in your instructions.) I ended up just taking out the drag and drop function so that it stays put in the middle of the screen. Hopefully I didn't screw things up too badly.

    Oh, and I do want to apologize for posting about the multiple scripts. I read those guidelines on Friday and somehow between then and now I completely forgot that one. Thanks for helping despite that.

    -Stephanie

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
  •