close does not work in FF4 but works in IE9 ans chrome 11

9 views
Skip to first unread message

Olivier

unread,
May 14, 2011, 6:57:52 AM5/14/11
to fanc...@googlegroups.com
The goal is to create a file chooser in a fancybox. My code worked without problem in fb1.3.1 but when I upgraded to 1.3.4, it didn't work anymore in FF4.
In an iframe I have:
function SubmitElement(inputid, filename) {
    this.parent.PickFilename(inputid, filename);
}
<a  title="file1" href='#' onclick='SubmitElement(chooserId, "file1.jpg")'><img ...></a>
<a  title="file2" href='#' onclick='SubmitElement(chooserId, "file2.jpg")'><img ...></a>

And in the initial page, I have:
function PickFilename(inputid, filename) {
  //alert("inputid="+inputid+" filename="+filename);
  var input = document.getElementById(inputid);
  input.value  = filename;
  $.fancybox.close();
}
...
<a id='thumbchooser' href="../modules/HostedVideoAlbums/thumbpicker.php?inputid=m1_vid_thumbnail">
            <img style="vertical-align: middle;" src="../modules/HostedVideoAlbums/images/content.gif"></a>
The thumbchooser is the fancybox.

This works perfectly in IE9 and Chrome 11 but it FF4, the fancybox disappears but a new tab is cretaed and this tab contains the same thing as the fancybox!!!
Any idea?
Reply all
Reply to author
Forward
0 new messages