Hi,
Thanks for this, got a few reposnses regarding this.
This seems a more professional approach, I will try this and let you know
about it when I do it.
Thanks for your time.
Jerry
Ross Honniball <[EMAIL PROTECTED]> wrote:
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----
>
>
>
> 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=""
> else if (inc==1)
> document.getElementById("fader1").innerHTML=""
> else if (inc==2)
> document.getElementById("fader1").innerHTML=""
> else if (inc==3)
> document.getElementById("fader1").innerHTML=""
> else if (inc==4)
> document.getElementById("fader1").innerHTML=""
> else if (inc==5)
> document.getElementById("fader1").innerHTML=""
> else if (inc==6)
> document.getElementById("fader1").innerHTML=""
> else{
> document.getElementById("fader1").innerHTML=""
> inc=-1
> }
> fadingad()
> setTimeout("changead()",4000)
> }
> window.onload=changead
>
>
>
>
> ----end ads code----
>
> ----text refreshing----
>
>
> 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="Pre-order and Save"
> inc=-1
> }
> fadingtext()
> setTimeout("changetext()",8000)
> }
> window.onload=changetext
>
>
>
> ----end of text refreshing----
>
> Any help would be awsome, or solutions?
>
> Jerry
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Messenger 7.0: Free worldwide PC to PC calls
---------------------------------
Do you Yahoo!?
Yahoo! News: Get the latest news via video today!