Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Why isnt this working

Asked Modified Viewed 1,676 times
X
xPureEvilx
X
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

This is in the Panel:

openside("News Tick");
  echo "<script type='text/javascript' src='http://www.pompeyworld.co.uk/marquee.js'></script>
<center>
<div id='fade_base' style='width:850px;border:1px dotted black;padding:5px;height:80px;line-height:1.8em;'>
Latest News:<br>
<strong><em><a id='fade_link'></a></em></strong>
</div>
<p>
</div><p></center>" ;
closeside();



this is in the marquee.js file:

function setupFadeLinks() {
  arrFadeLinks[0] = '';
  arrFadeTitles[0] = 'Helo Everyone';
  arrFadeLinks[1] = 'This is a test';
  arrFadeTitles[1] = 'Hope you like it';
  arrFadeLinks[2] = 'This is our news';
  arrFadeTitles[2] = 'Please Read it';
}

// You can also play with these variables to control fade speed, fade color, and how fast the colors jump.

var m_FadeOut = 255;
var m_FadeIn=0;
var m_Fade = 0;
var m_FadeStep = 3;
var m_FadeWait = 1600;
var m_bFadeOut = true;

var m_iFadeInterval;

window.onload = Fadewl;

var arrFadeLinks;
var arrFadeTitles;
var arrFadeCursor = 0;
var arrFadeMax;

function Fadewl() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
  arrFadeLinks = new Array();
  arrFadeTitles = new Array();
  setupFadeLinks();
  arrFadeMax = arrFadeLinks.length-1;

}

function setFadeLink() {
  var ilink = document.getElementById("fade_link");
  ilink.innerHTML = arrFadeTitles[arrFadeCursor];
  ilink.href = arrFadeLinks[arrFadeCursor];
}

function fade_ontimer() {
  if (m_bFadeOut) {
    m_Fade+=m_FadeStep;
    if (m_Fade>m_FadeOut) {
      arrFadeCursor++;
      if (arrFadeCursor>arrFadeMax)
        arrFadeCursor=0;
      m_bFadeOut = false;
    }
  } else {
    m_Fade-=m_FadeStep;
    if (m_Fade<m_FadeIn) {
      clearInterval(m_iFadeInterval);
      setTimeout(Faderesume, m_FadeWait);
  setFadeLink();
      m_bFadeOut=true;
    }
  }
  var ilink = document.getElementById("fade_link");
  if ((m_Fade<m_FadeOut)&&(m_Fade>m_FadeIn))
    ilink.style.color = "#" + ToHex(m_Fade);
}

function Faderesume() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
}

function ToHex(strValue) {
  try {
    var result= (parseInt(strValue).toString(16));

    while (result.length !=2)
            result= ("0" +result);
    result = result + result + result;
    return result.toUpperCase();
  }
  catch(e)
  {
  }
}
0 replies

3 posts

M
miskith
M
My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
  • Member, joined since
  • Contributed 117 posts on the community forums.
  • Started 2 threads in the forums
answered
Member

http://www.pompeyworld.co.uk/news.php Your website? It's working for me (FF10, last Chrome, Opera and IE). In which browser do you have problem? If in Opera or Google Chrome, then you can use "Console". If in Firefox, you can install "FureBug" and use "Console" (maybe Firefox has Console by default too...). If in Internet Explorer.. I don't know about "Console" for Internet Explorer, but if something don't work in IE, then it often don't work in Chrome or Opera too.
0 replies
X
xPureEvilx
X
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

No, its working now because I made a html file with the JS in it, and used a Iframe.
Edited by xPureEvilx on 14-01-2012 05:51,
0 replies
F
faga
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

try this:

add_to_head("<script type='text/javascript' src='http://www.pompeyworld.co.uk/marquee.js'></script>");

openside("News Tick");
  echo "
<center>
<div id='fade_base' style='width:850px;border:1px dotted black;padding:5px;height:80px;line-height:1.8em;'>
Latest News:<br>
<strong><em><a id='fade_link'></a></em></strong>
</div>
<p>
</div><p></center>" ;
closeside();


PS. I think there's a missing code line.
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

F
F
faga 10
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates
  • Member, joined since
  • Contributed 158 posts on the community forums.
  • Started 14 threads in the forums
M
M
My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
  • Member, joined since
  • Contributed 117 posts on the community forums.
  • Started 2 threads in the forums
X
X
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet