Click to See Complete Forum and Search --> : <title>


David Harrison
04-18-2003, 01:09 PM
How can I create the title of a page using jscript?

DrDaMour
04-18-2003, 01:11 PM
ok this is definately a very tricky thing to do so try and stay with me on it, ok.. just try...




document.title = "title";


could you hang tough enough?

David Harrison
04-18-2003, 02:14 PM
Thank's for your detailed reply, very tricky stuff but where do I put document.title="title"?
In a script tag in the head? If so does this mean I can put it in a separate .js file?

DrDaMour
04-18-2003, 02:55 PM
put it anywhere you want, but it will only be run if it is run, meaning if it's in a fucntion teh function will have to be called

David Harrison
04-18-2003, 03:34 PM
Gotya, would this overwrite the existing title (if there is one)?

DrDaMour
04-18-2003, 03:39 PM
it's the title object man, whatever you do to, the browser will respond.

so yeah