Obsah fóra
PravidláRegistrovaťPrihlásenie




Odpovedať na tému [ Príspevkov: 3 ] 
AutorSpráva
Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 03.10.07
Prihlásený: 09.12.08
Príspevky: 23
Témy: 9
Príspevok NapísalOffline : 03.10.2007 23:14

mam problem s tymto kodom, je zaujimave ze v IE to nechce ist, ale vo Firefoxe to v pohode ide.
Majitel toho scriptu mi povedal ze jemu to ide takze si vobec neviem s tym pomoct co je spatne.. mozno uz len na tych obrazkoch ze su velke alebo fakt neviem...
Budem velmi povdacny za kazdu pomoc...


Kód:
<script type="text/javascript">


// message to scroll
var marqueecontent='<a href="http://www.domain1.com" target="_blank"><img src="homepage/banner6.gif" border="0" width="150" height="50" class="banner" id="banner0"></a> <a href="http://www.domain2.com" target="_blank"><img src="homepage/banner1.gif" border="0" width="150" height="50" class="banner" id="banner1"></a> <a href="http://www.domain3.com" target="_blank"><img src="homepage/banner2.gif" border="0" width="150" height="50" class="banner" id="banner2"></a> <a href="http://www.domain4.com" target="_blank"><img src="homepage/banner3.gif" border="0" width="150" height="50" class="banner" id="banner3"></a> <a href="http://www.domain5.com" target="_blank"><img src="homepage/banner4.gif" border="0" width="150" height="50" class="banner" id="banner4"></a> <a href="http://www.domain6.com" target="_blank"><img src="homepage/banner5.gif" border="0" width="150" height="50" class="banner" id="banner5"></a>';
var copyspeed=2; // <-- speed of ticker
var tickerWidth = 300; // <-- ticker width
var tickerHeight = 50; // <-- ticker height

// global variables
var actualWidth='';
var jsMarquee1;
var jsMarquee2;
var div1Interval = 0;
var div2Interval = 0;
var timeToStartSecond= new Array(8)
var div1Status = 0;
var div2Status = 0;

document.write('<span id="temp" style="visibility:hidden;position:absolute;left:-5000px;">'+marqueecontent+'</span>'); // used to determine initial content width
document.write('<span id="temp2" style="visibility:hidden;position:absolute;left:-5000px;"></span>'); // used later to calculate the new width of the content

function populate(){
actualWidth=document.getElementById("temp").offsetWidth;
actualWidthTemp=document.getElementById("temp").offsetWidth;

// first DIV
jsMarquee1=document.getElementById('marquee1');
jsMarquee1.style.left=parseInt(tickerWidth)+"px";

// second DIV
jsMarquee2=document.getElementById('marquee2');
jsMarquee2.style.left=parseInt(tickerWidth)+"px";

if(actualWidth <= (tickerWidth*2)){

var tempContent;
tempContent = "<nobr>";

// make sure that the div is larger than the ticker area
// if not, duplicate the content
while (actualWidth < (tickerWidth*2)){
tempContent = tempContent + marqueecontent;
actualWidth = actualWidth + actualWidthTemp;
}
tempContent = tempContent + "</nobr>"

// load the content into the divs
jsMarquee1.innerHTML=tempContent;
jsMarquee2.innerHTML=tempContent;

// get the new actual width of the content
document.getElementById("temp2").innerHTML=tempContent;
actualWidth = document.getElementById("temp2").offsetWidth;

}else{
// load the content into the divs
jsMarquee1.innerHTML="<nobr>"+marqueecontent+"</nobr>";
jsMarquee2.innerHTML="<nobr>"+marqueecontent+"</nobr>";
}

timeToStartSecond=(tickerWidth-actualWidth);
}
window.onload=populate

function scrollMarquee(){
if ((parseInt(jsMarquee1.style.left)>(actualWidth*(-1)))){
jsMarquee1.style.left=parseInt(jsMarquee1.style.left)-copyspeed+"px";

// call function to begin the second DIV
if(parseInt(jsMarquee1.style.left) < timeToStartSecond && div1Status == 0){
div1Status = 1;
div2Status = 0;
beginSecondMarquee();
}
}else{
//resets the div to it's original location
document.getElementById("marquee1").style.left = parseInt(tickerWidth)+"px";
//clear the interval and stop animation
div1Interval = window.clearInterval(div1Interval);
}
}

function scrollSecondMarquee(){
if (parseInt(jsMarquee2.style.left)>(actualWidth*(-1))){
jsMarquee2.style.left=parseInt(jsMarquee2.style.left)-copyspeed+"px";

// call function to restart the first DIV
if(parseInt(jsMarquee2.style.left) < timeToStartSecond && div2Status == 0){
div1Status = 0;
div2Status = 1;
startMarquee();
}
}else{
//resets the div to it's original location
document.getElementById("marquee2").style.left = parseInt(tickerWidth)+"px";
//clear the interval and stop animation
div2Interval = window.clearInterval(div2Interval);
}
}

/* begins the second marquee */
function beginSecondMarquee(){
div2Interval = window.setInterval("scrollSecondMarquee()",20);
}

/* begins the first marquee */
function startMarquee(){
div1Interval = window.setInterval("scrollMarquee()",20);
}
startMarquee();

document.write('<div style="position:relative;width:'+tickerWidth+'px;height:'+tickerHeight+'px;overflow:hidden">');
document.write('<div style="position:absolute;width:'+tickerWidth+'px;height:'+tickerHeight+'px;background-color:#DEFDD9" onMouseover="copyspeed=0" onMouseout="copyspeed='+copyspeed+'">');
document.write('<div id="marquee1" style="position:absolute;left:0px;top:0px;"></div>');
document.write('<div id="marquee2" style="position:absolute;left:0px;top:0px;"></div>');
document.write('</div>');
document.write('</div>');

</script>


Offline

Užívateľ
Užívateľ
slideshow baner IE -> FF problem

Registrovaný: 01.10.07
Prihlásený: 03.02.14
Príspevky: 747
Témy: 152
Bydlisko: Bratislava
Príspevok NapísalOffline : 09.10.2007 19:00

v IE nejde hrozne vela javaskriptov a nic na nich nemusi byt zle


Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 03.10.07
Prihlásený: 09.12.08
Príspevky: 23
Témy: 9
Príspevok Napísal autor témyOffline : 09.10.2007 19:46

uz mam na to fix, treba tam dat delay pred tym spustenim aby sa stihli nacitat obrazky to bol cely problem...


Odpovedať na tému [ Príspevkov: 3 ] 


Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy. Nextgen gallery=> problém so slideshow

v Redakčné systémy

27

711

02.09.2014 19:49

Ajulina Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Presun domeny -> Synology NAS -> Mail server -> Dynamicka IP -> DDNS -> SPAM???

v Úložné zariadenia

5

617

02.10.2018 14:46

JanoF Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Pohybujuci sa baner

v JavaScript, VBScript, Ajax

6

710

19.05.2009 10:07

pilná lama glama Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Baner s náhodnými fotkami

v JavaScript, VBScript, Ajax

12

587

23.01.2010 21:37

artech Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. MSI K8M NEO-V => nastavenie HT frekvencie => problem

v Biosy a ladenie výkonu

5

401

19.06.2016 15:42

brmbo Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. slideshow

v JavaScript, VBScript, Ajax

1

649

15.10.2008 11:37

m@-nX Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. slideshow

v JavaScript, VBScript, Ajax

4

569

04.05.2009 21:55

IntelSK Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Slideshow

v HTML, XHTML, XML, CSS

1

534

23.08.2008 13:51

exoomer Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Slideshow

v JavaScript, VBScript, Ajax

2

645

22.07.2009 10:35

don jebot Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. >>> Java - connection problem ! <<<

v Assembler, C, C++, Pascal, Java

2

700

22.07.2009 8:38

johny3212 Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. nefunkcny Slideshow

v JavaScript, VBScript, Ajax

0

470

25.08.2009 20:10

Krtko Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. BELKIN N+ V1 Router >>> WIFI Rýchlosť - Kabel CRC Error

v Siete

0

764

21.02.2012 18:29

rabidko Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. W.E.B.--->>>S.O.F.T.

v Webdesign

7

1166

23.11.2006 20:04

audiotrack Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. powerpoint-slideshow-audio

v Audio programy

1

670

18.12.2008 23:22

molotow Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Galeria obrazkov (slideshow)

v JavaScript, VBScript, Ajax

2

640

15.05.2011 14:23

costler Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Slideshow (asi neobyčajná)

v JavaScript, VBScript, Ajax

0

364

16.10.2010 14:49

emer Zobrazenie posledných príspevkov


Nemôžete zakladať nové témy v tomto fóre
Nemôžete odpovedať na témy v tomto fóre
Nemôžete upravovať svoje príspevky v tomto fóre
Nemôžete mazať svoje príspevky v tomto fóre

Skočiť na:  

Powered by phpBB Jarvis © 2005 - 2024 PCforum, webhosting by WebSupport, secured by GeoTrust, edited by JanoF
Ako väčšina webových stránok aj my používame cookies. Zotrvaním na webovej stránke súhlasíte, že ich môžeme používať.
Všeobecné podmienky, spracovanie osobných údajov a pravidlá fóra