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 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy window.open does not work on cloned content

    This problem only exists on Mozilla based browsers

    I have a table with records. You click on an ADD button next to any of the records, and another record is inserted just beneath that record after selecting the type of record from a popup dialog box.

    I use cloneNode and insertBefore or appendChild to accomplish this. It works fine in Internet Explorer but Mozilla refuses to execute the window.open command on any of the copied entries.

    The error I get is:

    Error: uncaught exception: Exception... "Component returned failure code: 0x804b000a nsIDOMJSWindow.open" nsresult: "0x804b000a (<unknown> )" location: "JS frame :: https://jupiter.tut.ac.za/jupiter/ap...pups/dialog.js :: anonymous :: line 44" data: no

    Here is a simplified example to show you what happens. It doesn't do much but should get the point over:

    https://jupiter.tut.ac.za/jupiter/ap...lems/index.htm

    The index.htm contains two javascript functions and I have also linked the two JS files used in this demo.

  • #2
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Got a solution from gso at mozillazine. By using <a href="javascript:add_entry(this)">here</a> it was possible to still call the wondow.open

    I ended up using
    Code:
    <a onclick="currentnode=this" href="javascript:add_entry(currentnode);">here</a>
    since calling the function this way prevents me from reading the A node as "this".

    Don't know why Mozilla works like this. Might be a bug?


  •  

    Posting Permissions

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