Forums : Les possiblités de la plateforme Mozilla

Aller à la discussion :  Plus récente Plus ancienne

# Application WEB avec XUL

Envoyé par : gojita

Date : 16/03/2007 10:46

Bonjour,

Voilà, je voudrais faire ma première application XUL qui serait un client d'un server CORBA.

D'autres part, je voudrais que mon application XUL ne soit pas installé sur les postes client.

Je penses donc avoir une architecture comme suit:

Server CORBA <---> SERVLET <---> WEB SERVER <--> Poste Client(XUL) Protocol: IIOP XML(RDF) XUL

Je voudrais donc que mon application XUL complète soit hébergé sur le WEB SERVER. mais je ne trouve pas la doc décrivant comment faire. Faut-il qu'il y ait une aborescence chrome sur mon server WEB ?

Y'a t-il une doc la dessus ?

J'ai essayé de faire comme suit:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window
   id="findfile-window"
   title="Recherche de fichiers"
   orient="horizontal"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

 <script>
 function buttonPressed(event)
 {
   window.open("fenetre.xul", "bmarks", "chrome,width=600,height=300");
 }

 var button = document.getElementById( "find-button" );
 button.addEventListener( 'command' , buttonPressed , true );
 </script>

 <button id="find-button" label="Rechercher"/>
 <button id="cancel-button" label="Annuler"/>

</window>

Pour la commande: window.open("fenetre.xul", "bmarks", "chrome,width=600,height=300"); J'ai essayé en spécifiant une URL http://monserver/fenetre.xul mais ca n'a pas fait grand chose.

Le fichier XUL ci dessus est situé à l'URL: http://monserver/toto.xul

Merci à tous

# Re: Application WEB avec XUL

Envoyé par : Christophe Charron

Date : 16/03/2007 11:10

Bonjour, non pas d'arborescence chrome sur site pour ma part, j'utilise

window.open("http://www.monsite/mafenetre.xul", "","chrome,hidechrome,centerscreen,modal,resizable,width=500,height=450")

pour ouvrir une fenêtre.

# Re: Application WEB avec XUL

Envoyé par : thefab

Date : 16/03/2007 21:27

Il me semble que getElementById() ne fonctionne qu'une fois le document totalement chargé, donc button devrait être null:

var button = document.getElementById("find-button");

Essaye de cette manière:

<script>
function buttonPressed(event)
  {
  window.open("fenetre.xul", "bmarks", "chrome,width=600,height=300");
  }
</script>

<button id="find-button" label="Rechercher" oncommand="buttonPressed"/>

Ou de celle-ci:

<script>
function onLoad()
  {
  var button = document.getElementById("find-button");
  button.addEventListener("command", buttonPressed, true);
  }
function buttonPressed(event)
  {
  window.open("fenetre.xul", "bmarks", "chrome,width=600,height=300");
  }
window.addEventListener("load", onLoad, true);
</script>

<button id="find-button" label="Rechercher"/>

# Re: Application WEB avec XUL

Envoyé par : gojita

Date : 29/03/2007 16:16

Cool merci à tous.

Il n'est plus possible de poster des messages dans ce forum.


Copyright © 2003-2013 association xulfr, 2013-2016 Laurent Jouanneau - Informations légales.

Mozilla® est une marque déposée de la fondation Mozilla.
Mozilla.org™, Firefox™, Thunderbird™, Mozilla Suite™ et XUL™ sont des marques de la fondation Mozilla.