Hi,
It works and I say that because i saw it in Firebug (
http://www.getfirebug.com/) but i think you can't see it in the browser? Is
the view refreshed ?
--
Cordially
Christophe
2007/3/2, Alexandre Giuseppe de Fuccio Pereira <[EMAIL PROTECTED]
:
Hey Christophe, thanks for the answer.
The example you gave me does not work when wrapped by a setInterval call.
Here is the function in my javascript file:
***********************
1. function updateTime () {
2. var win = document.getElementById("mywindow");
3. var lbl = document.getElementById("mylabel");
4. elapsed = elapsed + 1;
5. var time = maketime( elapsed );
6. win.setAttribute ("title", time);
7. lbl.value = time;
8. }
9. setInterval('updateTime()',1000);
*************************
The label is updated, but the title isn't.
Weird stuff:
- If I change line 9 to updateTime(), the title is updated but the label
isn't.
- If I swap lines 6 and 7 and call updateTime() nothing happens.
Please, enlighten me!
-- Alexandre Giuseppe de Fuccio Pereira.
2007/3/1, Christophe Charron < [EMAIL PROTECTED]>:
>
> Hi,
>
> 2007/3/1, Alexandre Giuseppe de Fuccio Pereira <[EMAIL PROTECTED]
> >:
> >
> > Hi folks,
> >
> > I'm trying to build my first XUL application and I can't find how to
> > update a window title.
> >
> > I've tried:
> >
> > document.title = "new title";
> >
> > element = document.getElementById ("window");
> > element.title = "new title"
> >
> > How can I do that?
>
>
>
> The following code works :
> **********************
> <?xml version="1.0 "?>
> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
> <window id="yourwindow" title="old title"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
>
> <script type="text/javascript">
> <![CDATA[
> function pf_change_title(){
> var win=document.getElementById("yourwindow");
> win.setAttribute("title","Here is the new title, yeah !!");
>
> }
> ]]>
> </script>
> <label value="Put your XUL here!"/>
> <button label="change window title" oncommand="pf_change_title();"/>
> </window>
> ***************************
>
>
> Thanks,
> > -- Alexandre Giuseppe de Fuccio Pereira
> >
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> > share your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > XUL News Wire - http://xulnews.com
> > XUL Job Postings - http://xuljobs.com
> > Open XUL Alliance - http://xulalliance.org
> > _______________________________________________
> > xul-talk mailing list
> > xul-talk@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/xul-talk
> >
> >
> --
> Cordially,
> Christophe Charron
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> XUL News Wire - http://xulnews.com
> XUL Job Postings - http://xuljobs.com
> Open XUL Alliance - http://xulalliance.org
> _______________________________________________
> xul-talk mailing list
> xul-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xul-talk
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
XUL News Wire - http://xulnews.com
XUL Job Postings - http://xuljobs.com
Open XUL Alliance - http://xulalliance.org
_______________________________________________
xul-talk mailing list
xul-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xul-talk
--
Cordialement
Christophe Charron
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
XUL News Wire - http://xulnews.com
XUL Job Postings - http://xuljobs.com
Open XUL Alliance - http://xulalliance.org
_______________________________________________
xul-talk mailing list
xul-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xul-talk