HighDots Forums  

copy from body into title

alt.html.dhtml alt.html.dhtml


Discuss copy from body into title in the alt.html.dhtml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
chris
 
Posts: n/a

Default copy from body into title - 01-01-2004 , 11:41 AM






Hi,

I need some dhtml/javascript/asp which I can use to put between some
words within the body of a page which takes these words and places
them inbetween the title tags.

The idea is when an editor changes these tagged words, it will also
change in the title tags of a page.

Any ideas??

CF

Reply With Quote
  #2  
Old   
Woolly Mittens
 
Posts: n/a

Default Re: copy from body into title - 01-10-2004 , 03:50 AM






Untested and out of the top of my head:

<p>my text <span id="mytitle">my title</span> more of my text</p>

<script type="text/javascript">
document.title = document.getElementById('mytitle').innerHTML;
</script>

(it might be window.title I forget)

Please note that using titles like this, won't get them indexed by google.

Greetings,
Woolly's weblab
http://www.woollymittens.nl/content/weblab/




"chris" <lootads (AT) yahoo (DOT) co.uk> wrote

Quote:
Hi,

I need some dhtml/javascript/asp which I can use to put between some
words within the body of a page which takes these words and places
them inbetween the title tags.

The idea is when an editor changes these tagged words, it will also
change in the title tags of a page.

Any ideas??

CF



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.