Re: Help need please?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Get rid of both your onload= statements and replace with...

window.onload=doboth

Then include the function below...

function doboth() {
   changetext();
   changead();
}


Not sure what you were getting at regarding the " thing, but I think the browser must just over-ride the previous onload statement when more than one is provided. I'm guessing the " thing you were talking about accidently commented one out and activated the other.

Hope this helps.

Ross



JeRRy wrote:
Hi,
I know this is not PHP/MySQl related but every other board I have posted on I have not got a response, so I'll try here also. I'm missing something basic, surely here so that is another reason I am posting here.. Here goes... I have two lots of code here, one is for a refreshing text code in Javascript and another is a banner refreshing ad system. Using similiar technequies. But I can only get the refreshing text to appear but can't get the ads to work on the one page. :( But if I add a " in any text area of the text refreshing than the ads system works but the text refreshing don't. But if I remove the " from any text area the text refreshing works but the ads don't. I can't seem to find the problem. Here is the code(s) ----ads code---- <center>
  <script language="JavaScript1.2">
hexinput=255  // Initial color value.
var inc=-1 //increment variable
function fadingad(){ if(hexinput>0) { hexinput-=11; // increase color value
document.getElementById("fader1").style.color="rgb("+hexinput+","+hexinput+","+hexinput+")"; // Set color value.
setTimeout("fadingad()",20); }
else
hexinput=255  //reset hex value
}
  function changead(){
if (!document.getElementById) return
inc++
if (inc==0)
document.getElementById("fader1").innerHTML="<img src=adtest/b1.jpg>"
else if (inc==1)
document.getElementById("fader1").innerHTML="<img src=adtest/b2.jpg>"
else if (inc==2)
document.getElementById("fader1").innerHTML="<img src=adtest/b3.jpg>"
else if (inc==3)
document.getElementById("fader1").innerHTML="<img src=adtest/b4.jpg>"
else if (inc==4)
document.getElementById("fader1").innerHTML="<img src=adtest/b5.jpg>"
else if (inc==5)
document.getElementById("fader1").innerHTML="<img src=adtest/b6.jpg>"
else if (inc==6)
document.getElementById("fader1").innerHTML="<img src=adtest/b1.jpg>"
else{
document.getElementById("fader1").innerHTML="<img src=adtest/b2.jpg>"
inc=-1
}
fadingad()
setTimeout("changead()",4000)
}
  window.onload=changead
  </script>
  <div id="fader1" style="font:18px Arial bold;width:100%;color:rgb(255,255,255)"></div>
  </center>
----end ads code---- ----text refreshing---- <script language="JavaScript1.2">
hexinput=255  // Initial color value.
var inc=-1 //increment variable
function fadingtext(){ if(hexinput>0) { hexinput-=11; // increase color value
document.getElementById("fader").style.color="rgb("+hexinput+","+hexinput+","+hexinput+")"; // Set color value.
setTimeout("fadingtext()",20); }
else
hexinput=255  //reset hex value
}
  function changetext(){
if (!document.getElementById) return
inc++
if (inc==0)
document.getElementById("fader").innerHTML="Soon to be Released"
else if (inc==1)
document.getElementById("fader").innerHTML="What you really need to know about Testing and Tagging"
else if (inc==2)
document.getElementById("fader").innerHTML="250 Pages of jam-packed reality testing regimes that will maintain a safer working environment for all"
else if (inc==3)
document.getElementById("fader").innerHTML="Learn what's it all about before they come and do it for you - A must read for all Clients, Employers, Electricians and Competent Persons"
else if (inc==4)
document.getElementById("fader").innerHTML="Just when you thought you knew what testing and tagging was all about - along comes a book!"
else if (inc==5)
document.getElementById("fader").innerHTML="Memberships available"
else if (inc==6)
document.getElementById("fader").innerHTML="Are you really doing it right?"
else{
document.getElementById("fader").innerHTML="<a href=order.php>Pre-order</a> and Save"
inc=-1
}
fadingtext()
setTimeout("changetext()",8000)
}
  window.onload=changetext
  </script>
  <div id="fader" style="font:18px Arial bold;width:100%;color:rgb(255,255,255)"></div>

  ----end of text refreshing----
Any help would be awsome, or solutions? Jerry
		
---------------------------------
Do you Yahoo!?
  Messenger 7.0: Free worldwide PC to PC calls

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux