JavaScript Problem, Please give me some help |
![]() ![]() |
JavaScript Problem, Please give me some help |
Apr 5 2008, 02:22 PM
Post
#1
|
|
|
Newbie ![]() Group: Member Posts: 3 Joined: Apr 2008 Member No: 637,904 |
I have a JavaScript as shown below, it is a script to change a phrase in a div for a given time interval. I have tested in on my computer with the code alone, it works definitely. However, when I put it on the Xanga, it just didn't work.
Why?? is there any way to modify it so to make it work on my xanga please? <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <DIV style="MARGIN: 3px 0px 1px 4px" align="center"> <DIV id=oTransContainer style="FILTER: progidXImageTransform.Microsoft.Wipe(GradientSize=1.0, wipeStyle=0, motion='forward'); WIDTH: 165px; HEIGHT: 103px"> <div id=oDIV1 style="position:absolute; width:260px; height:115px; z-index:1; left: 50px; top: 77px; filter:Alpha(opacity=10)"; style="visibility: visible"> <font color="#ffffff">AAAAAAAAA</font> </div> <div id=oDIV2 style="position:absolute; width:260px; height:115px; z-index:1; left: 50px; top: 77px; filter:Alpha(opacity=10)"; style="visibility: hidden"> <font color="#ffffff">BBBBBBBBBB</font> </div> <div id=oDIV3 style="position:absolute; width:260px; height:115px; z-index:1; left: 50px; top: 77px; filter:Alpha(opacity=10)"; style="visibility: hidden"> <font color="#ffffff">CCCCCCCCCC</font> </div> <div id=oDIV4 style="position:absolute; width:260px; height:115px; z-index:1; left: 50px; top: 77px; filter:Alpha(opacity=10)"; style="visibility: hidden"> <font color="#ffffff">DDDDDDDDDD</font> </div> <script> var NowFrame = 1; var MaxFrame = 4; var bStart = 0; function fnToggle() { var next = NowFrame + 1; if(next == MaxFrame+1) { NowFrame = MaxFrame; next = 1; } if(bStart == 0) { bStart = 1; setTimeout('fnToggle()', 6000); return; } else { oTransContainer.filters[0].Apply(); document.getElementById('oDIV'+next).style.visibility = "visible"; document.getElementById('oDIV'+NowFrame).style.visibility = "hidden"; oTransContainer.filters[0].Play(duration=2); if(NowFrame == MaxFrame) NowFrame = 1; else NowFrame++; } setTimeout('fnToggle()', 6000); } fnToggle(); </SCRIPT> </DIV> </td> </tr> <tr> <td> </td> </tr> </table> |
|
|
|
Apr 5 2008, 05:10 PM
Post
#2
|
|
![]() kthxbai ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 3,829 Joined: Feb 2008 Member No: 621,203 |
xanga doesn't allow java?
|
|
|
|
Apr 6 2008, 07:44 PM
Post
#3
|
|
|
Newbie ![]() Group: Member Posts: 3 Joined: Apr 2008 Member No: 637,904 |
Xanga should allow JavaScript ....right?
|
|
|
|
Apr 11 2008, 11:16 PM
Post
#4
|
|
![]() kthxbai ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 3,829 Joined: Feb 2008 Member No: 621,203 |
no.
|
|
|
|
Apr 11 2008, 11:19 PM
Post
#5
|
|
![]() Cornflakes :D ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 19,102 Joined: Dec 2005 Member No: 322,923 |
yes it does, myspace doesn't support javascript.
QUOTE
|
|
|
|
Apr 12 2008, 12:03 PM
Post
#6
|
|
![]() kthxbai ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 3,829 Joined: Feb 2008 Member No: 621,203 |
k fine. 99% of java DOES NOT work on xanga.
|
|
|
|
Apr 14 2008, 11:07 PM
Post
#7
|
|
![]() torn ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 1,000 Joined: Oct 2004 Member No: 55,718 |
I'm pretty sure that Xanga only allows Javascript if you put it in the javascript module. Some very basic scripts (like document title) will work in the regular header input module, but most don't. So unless you're using the default Xanga setup (no custom modules/navi), I don't think scripts will work.
|
|
|
|
Apr 16 2008, 06:40 PM
Post
#8
|
|
|
Newbie ![]() Group: Member Posts: 3 Joined: Apr 2008 Member No: 637,904 |
so my JavaScript is not able to work on Xanga
|
|
|
|
Apr 17 2008, 12:59 PM
Post
#9
|
|
![]() torn ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 1,000 Joined: Oct 2004 Member No: 55,718 |
Oh, nevermind. Duhh. Xanga Help has what you need.
http://help.xanga.com/installingcode.htm It says you need to put the javascript part of it in the website stats box. Generally, anything you put in the input header html box goes before the blog entries, and anything you put in website stats goes after the blog entries. To close the table with the xanga entries, put </table> as the very first thing in the website stats box. Unless you're just doing a default layout thing, I guess; then it doesn't really matter. |
|
|
|
![]() ![]() |