473,382 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Change title

How do you change the title within <title> and </title> by JS?
Thank you for your help.
M.K.
Jul 20 '05 #1
5 23777
the displayed document title can be changed with:
document.title="your title here"
Jul 20 '05 #2
Thank you for your help but the following does not work:
<HTML>
<HEAD>
<title>ABC</title>
<SCRIPT LANGUAGE=JavaScript>
function start() {
document.title("XYZ");
}
</SCRIPT>
</HEAD>
<BODY onload="start()">
</BODY>
</HTML>

"JimMenees" <ji*******@aol.comNoSpam> wrote in message
news:20***************************@mb-m23.aol.com...
the displayed document title can be changed with:
document.title="your title here"

Jul 20 '05 #3
Masao Kishore hu kiteb:
Thank you for your help but the following does not work:
<HTML>
<HEAD>
<title>ABC</title>
<SCRIPT LANGUAGE=JavaScript>
function start() {
document.title("XYZ");

document.title="your title here"


Spot the difference.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #4
Masao Kishore wrote on 24 Nov 2003:
Thank you for your help but the following does not work:
<HTML>
<HEAD>
<title>ABC</title>
<SCRIPT LANGUAGE=JavaScript>
That should read:

<SCRIPT type="text/javascript">

The type attribute is mandatory and is all you really need.
function start() {
document.title("XYZ");


<snip>

document.title is a property, not a method. You assign to it - you
don't call it.

Mike

--
Michael Winter
M.******@blueyonder.co.uk.invalid (remove ".invalid" to reply)
Jul 20 '05 #5
While the city slept, Masao Kishore <on@request.com> feverishly typed:
How do you change the title within <title> and </title> by JS?
Thank you for your help.


As the others have said, document.title="blah". Bear in mind, though, that
NN4 treats the document title as read-only, and will not let you change it.
Then again, NN4 is an abberation and the sooner it is no longer used, we can
all breath a sigh of relief ;-)

Cheers,
Nige

--
Nigel Moss.

Email address is not valid. ni***@nigenetDOG.org.uk. Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
In the land of the blind, the one-eyed man is very, very busy!
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Treetop | last post by:
is there a way to change the <title> tag from a parent window from a child window in frames?
34
by: Andrew DeFaria | last post by:
I thought this would be fairly straight forward but apparently it's not. Given the following html file: <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html> <head>...
4
by: Richard Trahan | last post by:
(This is a repost -- the original got tucked away into an old thread because I used the same Subject name.) I'm trying to change the document title to add an asterisk when the document becomes...
4
by: DerekM | last post by:
I have a database project that I created with several forms and reports. I would like to be able to declare a single title and be able to change the title on all the forms and reports by changing...
6
by: Guogang | last post by:
Hi, is there a way to change the page's title in code behind (C#)? I want to change this part: <HEAD> <TITLE> Can be changed dynamically. </TITLE> </HEAD> Thanks, Guogang
4
by: ACaunter | last post by:
Hi there, I was wondering if there was a way to change the font color of the text in the title bar... by default the title bar is that dark blue faiding into light blue and it has white text......
7
by: Tim Rogers | last post by:
Hi folks, this is a resolution-detect script that I used on a site. As you can see it is designed to detect when the screen resolution falls below a certain level then load an alternative style...
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change?...
7
by: imad.sabonji | last post by:
HI I am using Visual Studio.Net 2003 and using C# I would like to know how is it possible to change the Internet explorer window title? ie. i want to get rid of "Microsot Internet Explorer"...
5
mikek12004
by: mikek12004 | last post by:
I have an xml written in a file. I want in the 1st line <code> <?xml version="1.0" encoding="iso-88-59-7"?> </code> to change the encoding to utf-8 any easy way to do that?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.