Open jQuery ui Dialog in Firefox extension -


i need open jquery ui dialog clicking button in firefox toolbar (developed firefox extension). i've added .js files in .xul file, doesn't work reason. use mozilla firefox 4. here source code:

.xul file:

..  <script type="application/x-javascript" src="chrome://tuttoolbar/content/tuttoolbar.js" />  <script type="application/x-javascript" src="chrome://tuttoolbar/content/scripts/jquery-1.4.2.min.js" />  <script type="application/x-javascript" src="chrome://tuttoolbar/content/scripts/jquery-ui-1.8.4.custom.min.js"/>  ...  <toolbarbutton id="example" tooltiptext="ui dialog" label="open jq dialog" oncommand="objtutorialtoolbar.sayhello1(event); event.stoppropagation();"/> 

tuttoolbar.js:

   ....     var objtutorialtoolbar = {     ......     sayhello1 : function(aevent) {      var docurl =  window.content.document.location.href;      var div = document.createelement("div");      div.setattribute("id", "dialog_dummy");      var body = document.getelementsbytagname("body").item(0);      body.appendchild(div);      $dialog = $('#dialog_dummy').html('').dialog(     {       title : 'title',       modal : false,       autoopen : false,       show : 'slide',       hide : 'slide',       url : docurl,       height: 550,       width: 1050     });         $dialog.dialog("open");     },     ...  } 

does know mistake in code above?

document in code above xul document code executing in. isn't html document doesn't have <body> element (document.getelementsbytagname("body") gives empty list). , if had one, i'm pretty jquery's "dialogs" built positioning system of html, not box model used in xul. in other words - cannot work. wanted showing <panel> element (see https://developer.mozilla.org/en/xul/panel). or maybe full-fetched xul dialog window (see https://developer.mozilla.org/en/xul/dialog , https://developer.mozilla.org/en/dom/window.opendialog).


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -