Log in

View Full Version : Resolved Internet page tab text script etc



theremotedr
08-12-2015, 03:55 PM
Here is the page in question.
http://ac-autosolutions.com

The tab at the top of the page changes every so often.
I would like some advice on how this is done or could you point out to me the code/script i need to take from there source.

Thanks.

theremotedr
08-12-2015, 04:15 PM
I think ive grabbed the correct script and applied it to this page http://www.theremotedoctor.co.uk but does not work for me.

Please take a look.

Many thanks.

vwphillips
08-13-2015, 03:29 PM
Here is the page in question.
http://ac-autosolutions.com

The tab at the top of the page changes every so often.


I can not see any tab changing

The script you have isolated changes the document title

this will not be visible on the page

this may be what you are looking for


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>
<style type="text/css">
/*<![CDATA[*/
#text {
width:100%;height:50px;background-Color:#FFFFCC;text-Align:center;font-Size:20px;
}

/*]]>*/
</style></head>

<body>
<div id="text" onmouseover="zxcTextRotator.Pause('text');" onmouseout="zxcTextRotator.Auto('text');" ></div>


<script type="text/javascript">
/*<![CDATA[*/

var zxcTextRotator={

Auto:function(id,ms){
var oop=this,o=oop['zxc'+id];
o?o.to=setTimeout(function(){ oop.rotate(o); },ms||200):null;
},

Pause:function(id){
var o=this['zxc'+id];
o?clearTimeout(o.to):null;
},

Init:function(o){
var id=o.ParentID,a=o.TextArray,h=o.HoldDelay,c=o.Cycles,p=document.getElementById(id);
if (p&&a instanceof Array){
o.id=id;
o.p=p;
o.a=a;
o.h=typeof(h)=='number'&&h>500?h:5000;
o.c=typeof(c)=='number'&&c>0?c:true;
o.n=0;
o.m=0;
this['zxc'+id]=o;
o.p.innerHTML=o.a[o.n];
this.Auto(o.id,o.h);
}
},

rotate:function(o){
o.n==o.a.length-1?o.m++:null;
o.n=++o.n%o.a.length;
o.p.innerHTML=o.a[o.n];
o.c===true||o.m<o.c?this.Auto(o.id,o.h):null;
}
}


zxcTextRotator.Init({ // call after the DIV has loaded
ParentID:'text',
TextArray:[
'THE REMOTE DOCTOR',
'Est in 2010',
'Honda Key Programming',
'Mobile Service',
'Located In W-S-M',
'07899 827427'
],
HoldDelay:2000,
Cycles:2
})
/*]]>*/
</script>

</body>

</html>

theremotedr
08-13-2015, 05:33 PM
Hi,
Thanks for that.
Ive now got it working but at the top of the page as opposed the document title tab.
Can you advise where exactly i need to correctly place it.

http://www.theremotedoctor.co.uk

Many thanks.

theremotedr
08-13-2015, 06:43 PM
I have now found a easier code which now applied works well.

Thanks for the reply.