i need help., my document title code won't work. |
i need help., my document title code won't work. |
Sep 24 2005, 04:43 PM
Post
#1
|
|
|
Newbie ![]() Group: Member Posts: 5 Joined: Sep 2005 Member No: 230,747 |
umm. here's my code.
QUOTE <script language="JavaScript"> document.title ="every petal's come off again, and fallen to the floor" </script> <style type="text/css"> BODY { scrollbar-face-color: FFFFFF; scrollbar-highlight-color: 9FBFDF; scrollbar-3dlight-color:FFFFFF; scrollbar-darkshadow-color:9FBFDF; scrollbar-shadow-color: FFFFFF; scrollbar-arrow-color:9FBFDF; scrollbar-track-color:FFFFFF; } table.navigation TD, table.footer TD { text-align: center; } </style> <style> .left, .blogbody, table.footer, .standard, .leftmodulefontcolor, td, p { /* edits main text */ font:normal 8pt trebuchet ms; line-height:10px; color:#9FBFDF; text-align:left; } table.footer TD { /* this makes the footer at the bottom centered */ /* leave it alone unless you know what to do*/ text-align:center; border:none; } div.blogheader, .caption { /* edits the dates */ font:bold 8pt trebuchet ms; text-transform:lowercase; text-decoration:none; color:#9FBFDF; background-color:#FFFFFF; text-align:center; border-left:2px solid #9FBFDF; border-top:2px solid #9FBFDF; border-right:2px solid #9FBFDF; padding:5px; } a:link, .footernav.link, a.footernav:link, a.footernav:active { /* edits all links */ color:#9FBFDF; font:normal 8pt trebuchet ms; line-height:10px; text-decoration:none; letter-spacing:0px; } a:visited, a.footernav:visited, { /* edits the links that the user has visited */ color:#9FBFDF; font:normal 8pt trebuchet ms; line-height:10px; text-decoration:none; letter-spacing:0px; } a:hover { /* edits when user mouseovers the links */ cursor:text; color:#9FBFDF; font:normal 8pt trebuchet ms; text-decoration:none; background-color:transparent; line-height:10px; letter-spacing:0px; } input, select, textarea, .textfield, .button { /* this edits the buttons, dropdowns, etc. */ border:1px solid #9FBFDF; font:normal 8pt trebuchet ms; color:#9FBFDF; background-color:transparent; letter-spacing:0px; text-align:center; } table.left { /* this edits the menu module */ width:150px; border:2px solid #9FBFDF; background-color:#FFFFFF; } table.blogbody { /* this edits the place where the blog is */ border-left:2px solid #9FBFDF; border-bottom:2px solid #9FBFDF; border-right:2px solid #9FBFDF; background-color:transparent; width:275px; text-align:left; letter-spacing:0px; line-height:10px; background-color:#FFFFFF; } table.left th { /* on your menu module, this edits the title part of it */ /* like BLOGRINGS, POSTING CALENDAR, etc */ background-image: url(); background-color:transparent; font:normal 10pt trebuchet ms; color:#9FBFDF; text-transform:lowercase; border:none; line-height:10px; text-align:left; letter-spacing:0px; } table.left TD { /* on your menu module, this edits the body part of it */ background-image: url(); border:none; background-color:transparent; font:normal 8pt trebuchet ms; color:#9FBFDF; text-decoration:none; text-align:left; text-transform:lowercase; letter-spacing:0px; line-height:10.5px; } table.search TD, table.search, table.announcements { /* border of search bar (if you have it) */ background-color: transparent; border:none; font:normal 8pt trebuchet ms; color:#000000; text-align:center; } table.search TD, table.announcements TH { /* this should be left alone */ /* unless you know what to do */ border:none; background-color:transparent; } table.navigation, table.main, table.footer { /* the width of your blog with modules */ width:425px; } hr { /* horizontal divider */ border:1px solid #9FBFDF; } </style> <script language="Javascript1.2"> // © 2004 CodeLifter.com function nrcIE(){ if (document.all){return false;}} function nrcNS(e){ if(document.layers||(document.getElementById&&!document.all)){ if (e.which==2||e.which==3){ return false;}}} if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=nrcNS; }else{document.onmouseup=nrcNS;document.oncontextmenu=nrcIE;} document.oncontextmenu=new Function("return false"); </script> <!--Get this code at http://help.xanga.com/replacelinks.htm//--> <script language="javascript"> <!-- var links = document.getElementsByTagName ("a"); for (var l = 0; l < links.length; l++) { str = links[l].innerHTML; if (str.match (/d+:d+ (am|pm)/i)) links[l] else if (str.match (/eprops/i)) links[l].innerHTML = str.replace (/eprops/i, "sweet nothings"); else if (str.match (/eprop/i)) links[l].innerHTML = str.replace (/eprop/i, "sweetness"); else if (str.match (/comments/i)) links[l].innerHTML = str.replace (/comments/i, "somethings"); else if (str.match (/comment/i)) links[l].innerHTML = str.replace (/comment/i, "something"); else if (str.match (/subscribe/i)) links[l].innerHTML = str.replace (/subscribe/i, "subscribe"); else if (str.match (/subscription/i)) links[l].innerHTML = str.replace (/subscription/i, "subscription"); else if (str.match (/subscriptions/i)) links[l].innerHTML = str.replace (/subscriptions/i, "subscriptions"); else if (str.match (/sign out/i)) links[l].innerHTML = str.replace (/sign out/i, "sign out here"); else if (str.match (/GuestBook/i)) links[l].innerHTML = str.replace (/GuestBook/i, "guestbook"); else if (str.match (/email it/i)) links[l].innerHTML = str.replace (/email it/i, "email"); }//--> </script> <!-- begin code provided by createblog.com --> <script type="text/javascript"> // // ©2004 EasterEgg // // For use at Xanga only. // // While the date in your blogheader has a fixed format // (e.g. "Tuesday, March 16, 2004") you may want to use // another date format, accustomed to *your* preferences. // This script enables you to apply pretty much any date // format to your blogheader you like. // // Here's how it works: // The script collects all blogheaders and applies to them // a format you define by changing the value of the variable // "dateFormatStr" in the code below. Currently that value is // set to 'ddd, mm/dd/yy', which will result in a date that // looks like this: 'Tue, 03/16/04'. If you want to use slashes // instead of divisions as date separators, go right ahead; you // can even add HTML to the date format string if you like!:-) // // ================= // listing of available constants (using the date // "Tuesday, March 16, 2004" as an example): // // dd = 16 // ddd = Tue // dddd = Tuesday // // mm = 03 // mmm = Mar // mmmm = March // // yy = 04 // yyyy = 2004 // // ================= // // You can use any combination of the above constants. Examples: // // 'mm/dd/yyyy' will result in '03/16/2004' // 'mmm dd, yy' will result in 'Mar 16, 04' // 'mm-dd-yy (dddd)' will result in '03-16-04 (Tuesday)' // '{ ddd, mmm dd, yyyy }', will result in '{ Tue, Mar 16, 2004 }' // // Get the general idea?;-) // // Copy this entire code and paste it in the webstats box of your // Look and Feel page. // // You're free to use this script as long as this comment remains // intact. Future modifications allowed if due credit is given. // function formatEntryDate() { // ***** adjust the dateFormatStr below as you see fit // =================================================== dateFormatStr = 'this entry is from dddd the dd of mmmm <hr>'; // =================================================== function getMonthNr(sMonth) { months = new Array( "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); for (var n = 0; n < months.length; ++n) { if (months[n] == sMonth) { if ( n + 1 < 10) return '0' + (n + 1).toString() else return (n + 1).toString(); } } } allDivs = document.getElementsByTagName('div'); for (var i = 0; i < allDivs.length; ++i) { if (allDivs[i].className == 'blogheader') { newDateFormat = dateFormatStr; // day entryDate = allDivs[i].innerHTML; dayLong = entryDate.substr(0, entryDate.indexOf(',')); // dddd dayShort = dayLong.substr(0, 3); // ddd tempStr = entryDate.substr(dayLong.length + 1); dayNr = tempStr.substr(tempStr.indexOf(',') - 2, 2); // dd newDateFormat = newDateFormat.replace('dddd', dayLong); newDateFormat = newDateFormat.replace('ddd', dayShort); newDateFormat = newDateFormat.replace('dd', dayNr); // month monthLong = tempStr.substr(1, tempStr.indexOf(',') - 3);// mmmm monthShort = monthLong.substr(0, 3); // mmm monthNr = getMonthNr(monthShort); // mm newDateFormat = newDateFormat.replace('mmmm', monthLong); newDateFormat = newDateFormat.replace('mmm', monthShort); newDateFormat = newDateFormat.replace('mm', monthNr); // year yearLong = tempStr.substr(tempStr.indexOf(',') + 2); // yyyy yearShort = yearLong.substr(2); // yy newDateFormat = newDateFormat.replace('yyyy', yearLong); newDateFormat = newDateFormat.replace('yy', yearShort); allDivs[i].innerHTML = newDateFormat; } } } formatEntryDate(); </script> <!-- end code provided by createblog.com --> i don't know what's wrong with it. but my 'document title' code won't work. am i doing something wrong? thanks, in advance. |
|
|
|
![]() |
Sep 24 2005, 04:53 PM
Post
#2
|
|
|
Senior Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 3,551 Joined: Feb 2005 Member No: 102,857 |
Hmmm try taking the old one out and putting this in your website stats.
CODE <script>
document.title = 'every petals come off again and fallen to the floor'; </script> |
|
|
|
Sep 24 2005, 08:33 PM
Post
#3
|
|
![]() <33 ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 2,745 Joined: Mar 2005 Member No: 114,234 |
awww, you beat me. anyway, yeah. I was about to say that but someone already did. :D oh, and would you mind using a codebox instead of a quote? that`s quite annoying, and kind of long.
|
|
|
|
Sep 25 2005, 10:28 AM
Post
#4
|
|
|
Newbie ![]() Group: Member Posts: 5 Joined: Sep 2005 Member No: 230,747 |
oh, sorry for the code box, i didn't know. oh hey, it works! thanks a lot.
|
|
|
|
Sep 25 2005, 10:29 AM
Post
#5
|
|
|
Newbie ![]() Group: Member Posts: 5 Joined: Sep 2005 Member No: 230,747 |
i'm guessing that it doesn't work if you put an apostrophe (') in the text..
|
|
|
|
![]() ![]() |