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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem referencing windows in Firefox for Mac

    Hello all! I have some code that works fine in Safari for Mac OS X but not in Firefox for Mac OS X, and I cannot figure out why.

    At one point in the process, I loop through a (very short) list of URLs, open a new window for each, and store a reference to each new window:

    Code:
    winArray[loopCount][6] = window.open(url,winName);
    Each of these windows has a DIV in it with id="detail". I want to load the contents of each "detail" DIV into a variable to extract some data from it. To load it up I used code like this:

    Code:
    var statblock = winArray[loopCount][6].document.getElementById("detail").innerHTML;
    I then have code to parse the data stuffed into the statblock variable. The entire application works perfectly for me in Safari for Mac OS X, but in Firefox for Mac OS X, the app fails precisely when it reaches the second line of code shown above. I've checked, and winArray[n][6] does contain a window reference in Firefox.

    Any ideas why this works in Safari but not Firefox, and how to fix it?

  • #2
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here are a couple of additional details, by the way. I tried troubleshooting by replacing this:

    Code:
    var statblock = winArray[loopCount][6].document.getElementById("detail").innerHTML;
    with this:

    Code:
    winArray[loopCount][6].focus();
    Firefox did not bring the appropriate window into focus. So the problem seems to be with the window reference instead of the DIV reference … but why only in Firefox? I'm confused.


  •  

    Posting Permissions

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