Re: [xul-interop] Updating window title
"Christophe Charron" <[email protected]> Thu, 1 Mar 2007 19:29:27 +0100
| Newsgroups | gmane.comp.lang.xul.general |
|---|---|
| Message-ID | <[email protected]> |
--===============0969662951== Content-Type: multipart/alternative; boundary="----=_Part_75248_17709725.1172773767851" ------=_Part_75248_17709725.1172773767851 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/xul-talk > > -- Cordially, Christophe Charron ------=_Part_75248_17709725.1172773767851 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,<br><br><div><span class="gmail_quote">2007/3/1, Alexandre Giuseppe de Fuccio Pereira <<a href="mailto:[email protected]">[email protected]</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi folks,<br><br>I'm trying to build my first XUL application and I can't find how to update a window title. <br><br>I've tried:<br><br>document.title = "new title";<br><br>element = document.getElementById ("window"); <br>element.title = "new title"<br><br>How can I do that?</blockquote><div><br><br>The following code works :<br>**********************<br><?xml version="1.0"?><br><?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <br><window id="yourwindow" title="old title" xmlns="<a href="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</a>"> <br><script type="text/javascript"><br><![CDATA[<br>function pf_change_title(){<br>var win=document.getElementById("yourwindow");<br>win.setAttribute("title","Here is the new title, yeah !!"); <br><br>}<br>]]><br></script><br><label value="Put your XUL here!"/><br><button label="change window title" oncommand="pf_change_title();"/><br></window><br>*************************** <br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks,<br><span class="sg">-- Alexandre Giuseppe de Fuccio Pereira<br> </span><br>-------------------------------------------------------------------------<br>Take Surveys. Earn Cash. Influence the Future of IT<br>Join SourceForge.net's Techsay panel and you'll get the chance to share your <br>opinions on IT & business topics through brief surveys-and earn cash<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV" target="_blank"> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</a><br>_______________________________________________<br>XUL News Wire - <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://xulnews.com" target="_blank"> http://xulnews.com</a><br>XUL Job Postings - <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://xuljobs.com" target="_blank">http://xuljobs.com</a><br>Open XUL Alliance - <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://xulalliance.org" target="_blank"> http://xulalliance.org</a><br>_______________________________________________<br>xul-talk mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:[email protected]">[email protected] </a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/xul-talk" target="_blank">https://lists.sourceforge.net/lists/listinfo/xul-talk</a><br><br></blockquote> </div><br>-- <br>Cordially,<br>Christophe Charron ------=_Part_75248_17709725.1172773767851-- --===============0969662951== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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 --===============0969662951== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ XUL News Wire - http://xulnews.com XUL Job Postings - http://xuljobs.com Open XUL Alliance - http://xulalliance.org _______________________________________________ xul-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xul-talk --===============0969662951==--