Log In · Register

 
 
Closed TopicStart new topic
HOW COME MY SCRIPT DOESNT WORK?
rosedoll
post Feb 18 2007, 11:11 PM
Post #1


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



<script type="text/javascript">

function replaceWords()
{
var oldWords = new Array(
"Name:",
"Birthday:",
"Gender:",
"Interests:",
"Expertise:",
"Email:",
"MSN:",
"Member Since:",
"eprops",
"eprop",
"comments",
"comment",
"email it",
"Subscriptions",
"My Blogrings",
"Posting Calendar",
"Get Involved!",
"Subscribe to D_ollylolita",
"read my profile",
"sign my guestbook",
"Next 5",
"Previous 5");

var newWords = new Array(
"<img src= http://i4.photobucket.com/albums/y105/ai_a...Iconns/icon.gif border=0>",
" ",
"<img src= http://i4.photobucket.com/albums/y105/ai_a...Iconns/icon.gif border=0>",
" ",
"<img src= http://i4.photobucket.com/albums/y105/ai_a...onns/ichigo.gif border=0>",
"<img src= http://i4.photobucket.com/albums/y105/ai_a..._Iconns/389.gif border=0>[朋友仔)ADD我就同我UP聲先<img src= http://i4.photobucket.com/albums/y105/ai_a..._Iconns/389.gif border=0>",
"◤如上na◢ <img src=

http://i4.photobucket.com/albums/y105/ai_a...Iconns/icon.gif border=0>",
"<img src= http://i4.photobucket.com/albums/y105/ai_a...nns/eicon21.gif border=0>

玫瑰種植日期:",
"<marquee behavior=alternate width=37><img src= http://i4.photobucket.com/albums/y105/ai_a...conns/bara3.gif

border=0></marquee> ROZE ",
" *我的薔薇 <marquee behavior=alternate width=37><img src= http://i4.photobucket.com/albums/y105/ai_a...conns/bara7.gif border=0></marquee>",
" 我的薔薇* <marquee behavior=alternate width=37><img src=

http://i4.photobucket.com/albums/y105/ai_a...conns/bara3.gif border=0></marquee>",
" ROZE <marquee behavior=alternate width=37><img src=

http://i4.photobucket.com/albums/y105/ai_a...conns/bara7.gif border=0></marquee>",
"<img src= http://i4.photobucket.com/albums/y105/ai_a...i_Iconns/30.gif border=0>",
"<img src= http://i4.photobucket.com/albums/y105/ai_a...nns/01d_005.gif border=0>",
"<img src= http://i4.photobucket.com/albums/y105/ai_a...P3993840N26.gif border=0> <img src=

http://i4.photobucket.com/albums/y105/ai_a...P3993840N26.gif border=0>&pound;&laquo;<img src=

http://i4.photobucket.com/albums/y105/ai_a...P3993840N26.gif border=0> ",
"<marquee behavior=alternate width=55><img src=http://i4.photobucket.com/albums/y105/ai_aangle/Minii_Iconns/04-09.gif

border=0></marquee><marquee behavior=alternate width=55><img src=

http://i4.photobucket.com/albums/y105/ai_a...conns/04-09.gif border=0></marquee>",
"<img src= http://i4.photobucket.com/albums/y105/ai_a...Iconns/icon.gif border=0>",
"<img src= http://i4.photobucket.com/albums/y105/ai_aangle/i16-01.gif border=0>",
"<img src= http://i4.photobucket.com/albums/y105/ai_a...Iconns/icon.gif border=0>",
"<img src= http://i4.photobucket.com/albums/y105/ai_a...Iconns/icon.gif border=0>",
"<marquee behavior=alternate width=37><img src= http://i4.photobucket.com/albums/y105/ai_a..._Iconns/754.gif

border=0></marquee> ",
"<marquee behavior=alternate width=37><img src= http://i4.photobucket.com/albums/y105/ai_a..._Iconns/753.gif

border=0></marquee>");


allTableData = document.getElementsByTagName('td');
allTableHeaders = document.getElementsByTagName('th');

var collections = new Array(allTableData,allTableHeaders);

for (var k = 0 ; k < collections.length ; ++k )
{
for (var i = 0 ; i < collections[k].length ; ++i )
{
if (collections[k][i].innerHTML.indexOf('TABLE') == -1)
{
for ( var n = 0 ; n < oldWords.length; ++n )
{
var indx = collections[k][i].innerHTML.indexOf(oldWords[n])
while (indx != -1)
{
var replacement = '';
indx = collections[k][i].innerHTML.indexOf(oldWords[n]);
replacement = collections[k][i].innerHTML.replace(oldWords[n], newWords[n]);
if(navigator.userAgent.toLowerCase().indexOf('compatible')>0){collections[k]

[i].innerHTML=replacement;//please use supported code at http://help.xanga.com/codes.htm
}
break;
}
}
}
}
}
}
replaceWords();
</script>
 
tokyo-rose
post Feb 19 2007, 12:18 AM
Post #2


Senior Member
********

Group: Head Staff
Posts: 18,173
Joined: Mar 2005
Member No: 108,478



You can't have the space after the = and before the URLs. Try getting rid of those and see if it works.
 
rosedoll
post Feb 19 2007, 12:39 AM
Post #3


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



it still didnt work

ill give you my site and see:

www.xanga.com/overrainnie/

also, i didnt know why my xanga is so long, i meant the middle part. i want it to be more wide......


please help!
 
*digital.fragrance*
post Feb 20 2007, 03:10 PM
Post #4





Guest






To my knowledge, you can't replace a word with a image script or marquee with this code.
 
rosedoll
post Feb 20 2007, 06:37 PM
Post #5


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



OH* yes you can! before my xanga were using the pictures for the eprops and comments too, but i didnt know why this script doesnt work!
you could go see this person's xanga, she's using the pictures for it also.
www.xanga.com/meltycandy/
 
*digital.fragrance*
post Feb 20 2007, 06:40 PM
Post #6





Guest






You have so many random symbols in your entire layout code... I think there must be a code that you have that is conflicting with it.

OR

You need to place 'single quotations' around the URL's of your images.
 
rosedoll
post Feb 21 2007, 11:30 PM
Post #7


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



its the same without "and put in ' this one....
 
Gypsy Eyes
post Feb 21 2007, 11:57 PM
Post #8


Senior Member
*******

Group: Staff Alumni
Posts: 7,025
Joined: Feb 2004
Member No: 4,051



QUOTE(digital.fragrance @ Feb 20 2007, 6:40 PM) *
You have so many random symbols in your entire layout code... I think there must be a code that you have that is conflicting with it.

I think it's that. The random chinese letters could be it as well.
 
rosedoll
post Feb 22 2007, 07:17 PM
Post #9


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



but i tried with out using the chinese letters in the script, still it doesnt work!!! ><``
 
*digital.fragrance*
post Feb 23 2007, 07:17 PM
Post #10





Guest






I think you're going to have to start from scrap - with that many script codes, something is bound to go wrong.
 
threepointone
post Feb 25 2007, 11:55 AM
Post #11


Senior Member
****

Group: Member
Posts: 122
Joined: Feb 2005
Member No: 106,057



I'd agree. Usually, when there's an error on one javascript code on a page, all the subsequent scripts just don't run. For all we know, this could be completely fine, but another script on your page is having problems. Seeing that you've got some more serious problems to fix on your page, you probably should get everything else fixed up.

If you still think the problem might be in this code, the most common error I see is a missing or additional quote character. Remember, the computer is stupid and can't tell if your a quote character is part of the thing you want to replace or the end of a string.
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: