Search Results

Search found 122 results on 5 pages for 'xul'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • Can a web app in xul:iframe access functions from its parent XUL file?

    - by oskar
    I want to deploy a web app as a self-contained program using XULRunner. I'm simply loading it in a xul:iframe tag within the main XUL file. It works, but I want the web app to have access to XUL components, specifically nsiFilePicker. My tentative solution is to run the xul:iframe with escalated privileges (by omitting the "type" attribute), wait for the xul:iframe to load, then define a javascript function that the web app will then call. <window id="main" width="800" height="600" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <iframe id="contentview" src="web/index.html" flex="1"/> <script> //listen for XUL window to load window.addEventListener("load",Listen,false); function Listen() { var frame = document.getElementById("contentview"); frame.addEventListener("DOMContentLoaded", DomLoadedEventHandler, true); } //listen for iframe to load function DomLoadedEventHandler() { //set function in iframe called testMe() var frame = document.getElementById("contentview"); frame.contentWindow.testMe = function () { alert("This is a test"); }; } </script> </window> ...and then in the index.html file of the web app... <script> testMe(); </script> This doesn't seem to work. Does anyone have any suggestions?

    Read the article

  • jQuery for XUL?

    - by Aaron de Windt
    I have read on the internet and found out that jQuery works OK on XUL. My questions are: Are there any jQuery plugins that are specially made to work with XUL? Is there any other jQuery-like library that was specially made for XUL? I have not yet tested jQuery on XUL, I'm just asking these questions for curiosity.

    Read the article

  • Building XUL app a-la SongBird

    - by Ben
    Hi, I've started exploring XUL Runner as a potential tool for an upcoming app. I can get some good examples running using the command line xulrunner-bin myapp. How can compile it all in a native looking application, like SongBird does. I understand SongBird packages the entire xul runtime with it, and I'm happy with that. I'm just wondering is there are any tool I can use to compile my xul project as a standalone app? Any Mac and/or PC hint much appreciated! EDIT: I guess what I'm looking for is a way to generate a Mac and/or PC XUL stub application (but not an installer). Is there something like that? cheers Ben

    Read the article

  • Opening a xul file in response to a toolbar extension button click

    - by Graham
    I'm currently building my first Firefox extension, and am having a little difficulty with one piece of functionality. I'd like to open a new browser tab in response to a button click on the toolbar. The new tab should contain the contents of a webpage, together with some extra buttons. At the moment I've created a separate xul file for the contents of the new tab: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="myapp-report-window" title="Example 4.5.1" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="chrome://myapp/content/main.js" /> <toolbox> <toolbar id="nav-toolbar"> <toolbarbutton label="This-is-going-to-do-some-stuff"/> </toolbar> </toolbox> <iframe id="myapp-report-frame" flex="1"/> <script type="text/javascript"> function loadPage(url){ document.getElementById('myapp-report-frame').setAttribute('src',url); } </script> </window> This xul file is launched via this javascript, referenced from the main myapptoolbar.xul: gBrowser.selectedTab = gBrowser.addTab('chrome://myapp/content/report.xul'); var newTabBrowser = gBrowser.getBrowserForTab(gBrowser.selectedTab); newTabBrowser.addEventListener("load", function(){ loadPage('http://www.somedynamicallysetwebsite.com'); }, true); The problem that I'm having is that the loadPage function is not being found, so the src attribute of the iframe is never set. I'm sure it's some silly scoping problem, but I'm very new to firefox extensions (day 2!) so any help would be much appreciated. Thanks for looking! Graham

    Read the article

  • Accessing XUL anonymous content using C++

    - by Vaibhav Gade
    Hi All, I am writing Firefox extension using C++. I am trying to access XUL:tabox element in "TabOpen" event handler, but I am unable access any XUL element. I am putting here pseudocode of my extension for reference: HandleEvent() { if (event type is TabOpen) { nsCOMPtr<nsIDOMNode> OriginalNode = do_QueryInterface(event->GetTarget); nsCOMPtr<nsIDOMNodeList> childlist; // // Note here that I got OriginalNode's local name as "tabbrowser" // OriginalNode->GetChildNodes(getter_AddRefs(childlist)); PRUint32 len; childlist->GetLength(&len); // Return 1; consider only "popup" child element. nsString localName; nsCOMPtr<nsIDOMNode> node1; childlist->Item(0, getter_AddRefs(node1)); node1->GetLocalName(localName); // Returns "popup" as the local name. } } By traversing the DOM tree through DOM Inspector, I came to know that XUL elements are anonymous content. How do I access these XUL elements? Very Thanks in advance, Vaibhav.

    Read the article

  • Call Init from XUL after Page Loads (Firefox add-on)

    - by mattyboy123
    Hi all, I've been working on some code in js/html and it works great. I'm now trying to package it into an add-on for Firefox, and having some issues getting the XUL document correct. PLAIN OLD HTML/JS In my html test file between the <head></head> I have: <script type="text/javascript" src="js/MyCode.js"></script> At the end of the test file before the </body> I have: <script type="text/javascript">MyCode.Static.Init();</script> FIREFOX ADD-ON: OVERLAY.XUL In an overlay.xul file in the extension package I have : <?xml version="1.0"?> <overlay id="mycode" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="chrome://mycode/content/MyCode.js"></script> <script> window.addEventListener("load", function () { gBrowser.addEventListener("load",MyCode.Static.Init,true); }, false); </script> </overlay> This does not seem to enter the method, but then again I'm not even sure if I've got the listeners firing properly. Would this be the correct way to duplicate what I was doing in plain old html/js ?

    Read the article

  • xpcom array can transfer in different xul files ?

    - by jin
    Now I am developing a firefox extension, can I define a global array in a js with the main xul . and I found when I use it in another js with another xul , it could not worked , so I searched the document of Firefox development. I found a common array can not be transfered between two js files with different xul files. and then I difined a xpcom mutablearray in a js: var eleList = Components.classes["@mozilla.org/array;1"] .createInstance(Components.interfaces.nsIMutableArray); but when I want to use it in another js : it still not work , why? Thank you very much!

    Read the article

  • Javascript:history.back is not workin in XUL application

    - by Rajeesh
    I have created a XUL application, it has got a link for navigating to previous page. This is my link <a href="javascript:history.back();">Back</a>, unfortunately it is not working!!! In firefox is working as expected, when I run it in XUL it is not working. Any idea, why it is not working. Thanks, Rajeesh

    Read the article

  • Table with unequal rows in XUL layout

    - by Michael
    Trying to get something similar for Firefox extension using XUL. The most difficult part is the grid with unequal number of rows. I tried <grid> but it didn't work well. Also don't want to use HTML inside of XUL. Any ideas how to build such table?

    Read the article

  • Passing an arbritrary JavaScript object in Xul

    - by Tom Brito
    I'm following this example to pass an object to a window, but when it as an argument it's with "undefined" value. This is my first window (obs. dump is the way to print to console when debug options are turned on): <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!DOCTYPE window SYSTEM "chrome://XulWindowArgTest/locale/XulWindowArgTest.dtd"> <window id="windowID" width="400" height="300" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> <![CDATA[ function onClickMe(event) { dump("begin\n"); try { var args = { param1: true, param2: 42 }; args.wrappedJSObject = args; var watcher = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].getService(Components.interfaces.nsIWindowWatcher); watcher.openWindow(null, "chrome://XulWindowArgTest/content/about.xul", "windowName", "chrome", args); } catch (e) { dump("error: " + e + "\n"); } dump("end\n"); } ]]> </script> <button label="Click me !" oncommand="onClickMe();" /> </window> and my second window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!DOCTYPE window SYSTEM "chrome://XulWindowArgTest/locale/XulWindowArgTest.dtd"> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="onload()"> <script> <![CDATA[ function onload() { dump('arg = ' + window.arguments[0].wrappedJSObject + "\n"); } ]]> </script> <label value="test" /> </window> when the second window loads, it calls the onload and prints: arg = undefined Any idea how to fix it?

    Read the article

  • Firefox XUL toolbar with javascript to IE?

    - by user325377
    Hi, I have developed a Firefox toolbar in XUL, which uses javascript to manipulate the DOM. I'd like to export this to IE. I know that IE doesn't support XUL, but wonder: (1) is there an easy way to use the existing javascript code for the IE toolbar as well? (2) is there a IE installer that easily creates all necessary registry values for creating a toolbar? I'd be grateful for any help. If anyone can point me to a sample IE toolbar code, with several buttons, drop-down menus and perhaps even a search box, that'll make things much easier as well. Thanks!

    Read the article

  • XUL: create menu items dynamically and set "selected" attr

    - by Michael
    I have a firefox extension Options pref panel, where I should dynamically create menu items and select particular item to be current. here is the XUL file part <menulist id="rss_service_combo"> <menupopup id="rss_service_menu"/> </menulist> Then in load event of the pref panel, using js I append menuitem elements into menupop. This is working fine. The only problem is that even if I set the selected element the item is not selected and combo box is initially empty. The only way is working at the moment is if I manually add those menuitems into XUL file and set selected attribute, but I need to do it dynamically.

    Read the article

  • Custom onsynctopreference for XUL textbox

    - by Alexey Romanov
    I wanted to enable custom shortcuts in my Firefox extension. The idea is that the user just focuses on a textbox, presses key combination, and it's shown in the textbox and saved to a preference. However, I couldn't get it to work. With this XUL <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="chrome://mozapps/skin/pref/pref.css" type="text/css"?> <!DOCTYPE window SYSTEM "chrome://nextplease/locale/nextplease.dtd"> <prefwindow id="nextpleaseprefs" title="&options.title;" buttons="accept, cancel" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="nextplease.general" label="&options.general.title;" image="chrome://nextplease/skin/Sound Mixer.png"> <preferences> <preference id="nextkey" name="nextplease.nextkey" type="int"/> </preferences> <vbox flex="1"> <hbox align="center"> <label value="&options.general.nextKey;" /> <textbox id="nextkey" flex="1" editable="false" onkeyup="return nextplease.handleKeySelection(this, event);" preference-editable="true" preference="nextkey" onsynctopreference="alert('syncing'); return nextplease.syncKeySelector(this);"/> </hbox> </vbox> </prefpane> <script type="application/x-javascript" src="chrome://nextplease/content/nextpleaseCommon.js" /> <script type="application/x-javascript" src="chrome://nextplease/content/nextpleaseOptions.js" /> </prefwindow> the event in onkeyup works. But when I click the OK button, I don't see a "syncing" alert. Why isn't onsynctopreference working? Is it impossible to have custom onsynctopreference attribute for a textbox?

    Read the article

  • Convert &euro; -> € in XUL

    - by Michael
    I need to convert HTML special symbols to their appropriate Unicode values in my Firefox extension. I'm not dealing with HTML DOM, so can't use the trick with giving value to div and taking back. Also there are too many of them to convert manually. Thought Firefox has something to use. The converted text should go to XUL's description element on statusbar. Any idea how to accomplish this?

    Read the article

  • Creating <li> with JavaScript in an XUL Application

    - by echox
    Hi! I try to create some li elements in my XUL Application. Theres only the text of the elements shown, but no list typical bullets and linebreaks. Example: text text text text text text text Heres the JS Code I use to create the list: var li = document.createElement('html:li'); var txt = document.createTextNode("only shown as simple text"); li.appendChild(txt); document.getElementById('someList').appendChild(li); HTML: <html:ul id="someList"> <html:li>this is shown in correct list style</html:li> </html:ul> I tried 'html:li' and also 'li' but nothing worked. Any suggestions?

    Read the article

  • XUL: fit all elements vertically in prefpane

    - by Michael
    here goes the XUL part of one of the preference panes. <prefpane id="alt-about" label="About" image="chrome://alt/skin/about.png"> <hbox> <vbox> <image id="armliveticker-about-logo" /> </vbox> <vbox> <description id="addonName">Bla bla bla, bla bla</description> <description id="version"/> <description>Author: bla bla bla</description> <description>ICQ: bla</description> <description>E-mail: [email protected]</description> <description>Website: www.bla-bla.com</description> <separator class="groove" flex="1"/> <description>News feed powered by Bla agency</description> <description>Exchange Rates are powered by Blaaaa Blaa of Blabla</description> </vbox> </hbox> </prefpane> and for some reason the window is not being vertically resized to fit last description element I tried many attributes, many combinations of vbox/hbox.. same. How to solve it guys?

    Read the article

  • XUL: Printing value from SQL query without using value attribute

    - by Grip
    I want to print the results of an SQL query in XUL with word-wrapping using the description tag. I have the following code: <grid> <columns> <column flex="2" /> <column flex="1" /> </columns> <rows datasources="chrome://glossary/content/db/development.sqlite3" ref="?" querytype="storage" > <template> <query>select distinct * from Terms</query> <action> <row uri="?"> <description value="?name" /> <description value="?desc" /> </row> </action> </template> </rows> This works for printing the data, but since I'm using the value attribute of description, there's no word-wrapping. I don't understand entirely what I'm doing with the value attribute, but I don't seem to be able to get the values of my SQL query in any other way. So, how could I get those values without the value tag? Thanks.

    Read the article

  • XUL shortcut keys

    - by jaswanttak
    Hi Friend, I am developing a Firefox add-on, and for that I have used overlay, now I want that if somebody presses the key like control+j it should open my extension, and if somebody presses ctrl+space it should execute a JavaScript function. I tried this: <keyset id="mainKeyset"> <key id="keyOpen" keycode="VK_J" oncommand="document.getElementById('menuboard').showPopup(document.getElementById('mypanel'), -1, -1, 'popup', 'topleft', 'bottomleft');"/> <key id="keyExecute" modifiers="control" keycode="VK_SPACE" oncommand="javascript:myfucntion();"/> </keyset> But where it's not working what I am missing can anybody help me, please. Thanks, Jaswant

    Read the article

  • How to display changing data in XUL

    - by pavithraCS
    Hi, I'm trying to build a firefox extension which can get rss feeds and display them in a popup panel. But I'm not aware about how to display feeds in a panel(I know how to display static text).Because the feed is varying all the time. Any help regarding this matter will be appreciated. Thanks in advance.

    Read the article

  • XUL - Access to image information

    - by Murali
    Hello All, I trying to figure out how to write a Firefox extension that would give image information when i right-click on the image. Basically, I want image path when user right-clicks on the image. Any help would be greatly appreciated. Thanks.

    Read the article

  • What do I have to do to get Firefox to display the add-on bar and XUL simultaneously?

    - by SmileAndNod
    On MDN, the phrase "Add-on Manager-enabled XUL" is introduced. By dragging a XPI file containing an add-on and dropping it onto a FireFox window, the addon's widgets will be installed in FireFox's add-on bar. By specifying the commandline option "-app application.ini" at the root of a chrome-structured directory, Firefox will display XUL using chrome:// protocol. Since MDN makes me think that the two are not mutually exclusive, my question is, "What do I have to do to get Firefox 8.0.1 to display the add-on bar and XUL simultaneously?"

    Read the article

1 2 3 4 5  | Next Page >