View Full Version : Getting title of page...
The Wizzard
09-05-2002, 04:01 AM
How do you get the title of your page?
adios
09-05-2002, 04:19 AM
document.title (d'oh!;) )
The Wizzard
09-05-2002, 04:20 AM
hmm.. I tried that, but got nothing...
adios
09-05-2002, 04:21 AM
What does 'tried that' mean?
The Wizzard
09-05-2002, 04:24 AM
I used document.title, but it didnt work...
joh6nn
09-05-2002, 04:46 AM
can we see the code you're using?
The Wizzard
09-05-2002, 04:49 AM
lol, ok, let me explain again...
I dont have any code, all im trying to do, is grab the title of my page, and display it on my page...
joh6nn
09-05-2002, 05:01 AM
...
you'd kinda be needin' some code to try and do that. you said you tried using document.title. can we see how you tried that?
The Wizzard
09-05-2002, 05:10 AM
Well, I dont know very much about Javascript, I tried this...
1.) <script language="Javascript">document.title</script>
2.) <script language="Javascript">('document.title')</script>
3.) <script language="Javascript">document.write('document.title')</script>
joh6nn
09-05-2002, 05:19 AM
ok. you were close on number 3
<script>
document.write(document.title);
</script>
no quotes. using quotes, makes something actual text, instead printing out the value that a variable contains.
The Wizzard
09-05-2002, 05:57 AM
Thanks joh6nn for you help. :thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.