How to get the platform name.

    var platformName = navigator.platform.toLowerCase();

technorati tags:,

Blogged with Flock

Posted in MOzilla. 1 Comment »

Getting Application Version at Runtime

    gApp  = Components.classes[“@mozilla.org/xre/app-info;1”]
        .getService(Components.interfaces.nsIXULAppInfo)
        .QueryInterface(Components.interfaces.nsIXULRuntime);
    return gApp.version;

technorati tags:, , ,

Blogged with Flock

Make the XUL Image act as a XUL button.

        <html:style type=”text/css”>

            image:focus

            {

                        background-color: black;

                        text-decoration: none;

                        border-style:dotted

            }

        </html:style>

        <image id=”loginButton”

                    onkeydown=”return ( event.keyCode != 32 &amp;&amp; event.keyCode != 13 ) || handleKey();”

                     style=”-moz-user-focus:normal !important” hidden = “true” />

technorati tags:, , ,

Blogged with Flock