|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Updating window titleHi 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? 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@... https://lists.sourceforge.net/lists/listinfo/xul-talk |
|
|
Re: Updating window title2007/3/1, Alexandre Giuseppe de Fuccio Pereira <alexandregiuseppe@...>: Hi folks, 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, -- 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@... https://lists.sourceforge.net/lists/listinfo/xul-talk |
|
|
Re: Updating window title2007/3/1, Alexandre Giuseppe de Fuccio Pereira <alexandregiuseppe@...>: Hi folks, 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, -- 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@... https://lists.sourceforge.net/lists/listinfo/xul-talk |
|
|
Re: Updating window titleThe 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 <
christophe.charron.xul@...>: Hi, ------------------------------------------------------------------------- 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@... https://lists.sourceforge.net/lists/listinfo/xul-talk |
|
|
|
|
|
|
|
|
Re: Updating window titleIt 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 <alexandregiuseppe@...>: Hey Christophe, thanks for the answer. -- 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@... https://lists.sourceforge.net/lists/listinfo/xul-talk |
|
|
Re: Updating window titleThanks for everybody. 2007/3/2, Christophe Charron <
christophe.charron.xul@...>: Hi, ------------------------------------------------------------------------- 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@... https://lists.sourceforge.net/lists/listinfo/xul-talk |
|
|
Re: Updating window titleLol, took me ages to figure this out...
Here's a clue, its in the subject line of this post (window.title) HTH D.
|
| Free embeddable forum powered by Nabble | Forum Help |