Updating window title

View: New views
9 Messages — Rating Filter:   Alert me  

Updating window title

by Alexandre Giuseppe de Fuccio Pereira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

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 title

by Christophe Charron-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,

2007/3/1, Alexandre Giuseppe de Fuccio Pereira <alexandregiuseppe@...>:
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@...
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@...
https://lists.sourceforge.net/lists/listinfo/xul-talk

Re: Updating window title

by Christophe Charron-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,

2007/3/1, Alexandre Giuseppe de Fuccio Pereira <alexandregiuseppe@...>:
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@...
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@...
https://lists.sourceforge.net/lists/listinfo/xul-talk

Re: Updating window title

by Alexandre Giuseppe de Fuccio Pereira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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 < christophe.charron.xul@...>:
Hi,

2007/3/1, Alexandre Giuseppe de Fuccio Pereira <alexandregiuseppe@...>:
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@...
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@...
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@...
https://lists.sourceforge.net/lists/listinfo/xul-talk

Parent Message unknown Re: Updating window title

by Aruna Devi Lakshmanan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

<?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">
function changeTitle(){

document.title = "New title";
     
}
</script>
<button label="change window title" oncommand="changeTitle();"/>
</window>


Worked for me.


DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return  e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited.  Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.

-------------------------------------------------------------------------
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

Parent Message unknown Re: Updating window title

by Aruna Devi Lakshmanan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



<?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">
function changeTitle(){

document.title = "New title";
     
}
</script>
<button label="change window title" oncommand="changeTitle();"/>
</window>


Worked for me.


DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return  e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited.  Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.

-------------------------------------------------------------------------
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 title

by Christophe Charron-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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 <alexandregiuseppe@...>:
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 < christophe.charron.xul@...>:
Hi,

2007/3/1, Alexandre Giuseppe de Fuccio Pereira <alexandregiuseppe@...>:
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@...
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@...
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@...
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@...
https://lists.sourceforge.net/lists/listinfo/xul-talk

Re: Updating window title

by Alexandre Giuseppe de Fuccio Pereira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Firebug shows the code is ok, but still wasn't working. I changed win.setAttribute to document.title and it worked.

Thanks for everybody.




2007/3/2, Christophe Charron < christophe.charron.xul@...>:
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 <alexandregiuseppe@...>:
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 < christophe.charron.xul@...>:
Hi,

2007/3/1, Alexandre Giuseppe de Fuccio Pereira <alexandregiuseppe@...>:
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@...
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@...
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@...
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@...
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@...
https://lists.sourceforge.net/lists/listinfo/xul-talk

Re: Updating window title

by Dean Bayley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lol, took me ages to figure this out...

Here's a clue, its in the subject line of this post (window.title)

HTH
D.

Alexandre Giuseppe de Fuccio Pereira wrote:
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?

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