mozilla

What is Web 3.0?

My boss asked me this yesterday just to gauge my response. Apparently, some of our clients are asking for "Web 3.0" I told him I really didn't know. He said when he's asked around the consensus is that it's microformats, etc. Frankly no one really knew either. (probably get a varied response now to "what is web 2.0?" still) I watche...

How to determine visible region of a Windows in X Windows / Linux?

I have several nested X Windows - let's say - a scrollable window within a scrollable window (see the example below). In such case the main window contains (at least) the major scroll bars and the (major) drawing area they control. This drawing area on its turn contains (at least) a scrollable window batch - a (minor) main window, contai...

How can I select an <img> element programmatically using JavaScript?

I have an <img> in an HTML document that I would like to highlight as though the user had highlighted it using the mouse. Is there a way to do that using JavaScript? I only need it to work in Mozilla, but any and all information is welcome. EDIT: The reason I want to select the image is actually not so that it appears highlighted, but ...

How can I associate a scriptable Mozilla plugin instance with its NObject?

I'm running into a problem associating an invoked method in a plugin I'm writing with the appropriate plugin instance. The documentation at http://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Scripting_plugins doesn't give enough information to be truly useful on this. In a nutshell, I'm trying to understand just which scriptable...

What's the difference between JavaScript and JScript?

I have always wondered what the heck is the difference between JScript and JavaScript. ...

How do I prevent Mozilla XMLSerializer from capitalizing nodes

I'm creating an XML Document in javascript on the client side, and then transforming it back to a string to send to the server. Mozilla has a handy method to accomplish this: XMLSerializer().serializeToString(), which I'm using. However, there seems to be a bug in this method: it returns all node names in uppercase and all attribute name...

How to change the cursor in a embedded browser

Hi, I have an application with an embedded gecko browser. I want to know how to change the cursor from the default cursor to a custom cursor when I am in the embedded browser? There is forms.css file in the res folder of the gecko sdk, I tried changing the cursor in that file with no success. Any suggestions? Thanks jbsp72 ...

XUL - sidebar buttons that load new pages in main browser window.

I'm learning how to make a firefox extension. I have created a xul and overlay file that makes a sidebar in my browser. I'm trying to put buttons in my sidebar that load different pages within the main browser window. I'm not sure how to access the main browser window and load a new url within it. I have here a simple button and script t...

In a Firefox extension, how can I copy rich text / links to the clipboard?

Specifically, I want to copy a link (with text and location) and then to be able to paste it, e.g., into Word as a link. ...

How can I get the window object that an HTML node belongs to using JavaScript?

Because of several iframes, XUL browser elements, and so forth, I have a number of window objects in my XULRunner application. I'm looking for the best way to find the window object that a specified node belongs to using JavaScript. So, to be more specific, given node x, I need to find the specific window object that contains x. ...

Open Source Profiling Frameworks?

Have you ever wanted to test and quantitatively show whether your application would perform better as a static build or shared build, stripped or non-stripped, upx or no upx, gcc -O2 or gcc -O3, hash or btree, etc etc. If so this is the thread for you. There are hundreds of ways to tune an application, but how do we collect, organize, pr...

Using preferences in Firefox

How do I access user preferences in Firefox? I have the following code: var control = document.getElementById(control_id); if (control) { control.setAttribute('color', nsPreferences.copyUnicharPref(prefstr, default_val)); } But when I run this, I get the following: Error: nsPreferences is not defined Source file: chrome://backgro...

What does XPCSafeJSObjectWrapper do?

What does Mozilla's XPCSafeJSObject wrapper actually do? MDC's documentation is as follows: This wrapper was created to address some problems with XPCNativeWrapper. In particular, some extensions want to be able to safely access non-natively-implemented content defined objects (and to access the underlying JavaScript object under an...

Sending Emails as a "batch execution job"

I do not have any experience in web based development(neither client side nor server s ide code). since long time i had a question as to if anything like below is possible to do: 1.) I have say 10 attachments 1.zip to 10.zip on my desktop. 2.) I need to send all of these as an attachment using any web based email (I need to send out th...

Mac - Flash file not loaded in independent flash player

Hi, I am working on an independent application to play flash files on Mac. I have already done the same for Linux, and it works flawlessly but on mac for some reason flash is not drawing to my window. It is not throwing any kind of error too. I am using Flash player 10, that would mean that I am using the Core Graphics drawing model. I ...

Mozilla/XPCOM - Getting URI from nsIDOMEvent

I'm using XPCOM, and I want to get the URI of the portion of a page the user clicks (e.g., a user right-clicks on a frame, and I want to display the URL of that frame). So I've set up a mouse listener (nsIDOMEventListener) and then when a click occurs, the handleEvent callback gives me access to the nsIDOMEvent. My question is, how do ...

How do I get the mouse button pressed from a command event in XUL?

It seems that the XUL command and click events are somewhat different. Although my function does get called when using the command event, the event object does not contain the button property. My question is: how do I detect what mouse button that was pressed without using the click event? The simplest code that can demonstrate my pro...

Cookies in Firefox

Where does Firefox store cookies and in what format are they stored ...

Firefox browser: How to display non-existing images the way IE/Opera does?

My Firefox 3.0.4 does not display non-existing images at all, or it displays the image alt as plain text (if available). This way I would have no idea that there is supposed to be an image there. Does anyone know if there is a way to make it work like IE/Opera? (ie. display a box even if the image file doesn't exists) - plugin or anythi...

-moz CSS properties and browser support

As of right now I believe only Firefox support -moz-border-radius property. I am surprised that twitter uses it. Are any other browsers planning on supporting this or does CSS3 have something like this in the works? edit:// also found -webkit-border-top-left-radius and then the CSS3 version So when is CSS3 coming out? ...