I am writing a bookmarklet that should work in the context of pages whose design I do not control. Some of the pages that I need a bookmarklet for will work in usage frames (in framesets). Is it possible for the jQuery-UI dialog to work inside a frame?
Currently, when I come across a page with a set of frames, I create my dialog as follows:
var frame = window.frames[0];
var div = $(frame.document.createElement("div"));
div.html("My popup contents");
div.dialog( ... );
As a result, jQuery adds a ui-widget div to the main document, not the frame document. Since the main document is just a set of frames, nothing is displayed. I cannot find any parameters in the jquery-ui API to indicate in which document widgets should be created. A booklet booklet will necessarily be launched (or at least launched) from the context of an external document.
I know that it will not be possible to display an overlay frame by frame ; Itβs convenient for me to display in only one frame. In addition, some other notable bookmarklets do not work on frameset pages, so this can be a common problem.
Suggestions?
source
share