PDA

View Full Version : javascripts side-by-side?



brent1a
05-09-2005, 05:37 AM
What tag do I use to butt 2 javascripts next to eachother? Actually one is a java applet and the other is a javascript. I want them side by side but all I can do is one on top of the other. Any help would be appreciated.
thanks
-Brent

glenngv
05-09-2005, 06:05 AM
...and the other is a javascript.
What script is it? Can you post or attach the code?

brent1a
05-09-2005, 06:13 AM
What script is it? Can you post or attach the code?..........</object>
<!-- Applet : End -->

<script language="JavaScript1.2"> var scrollerwidth='245px'
var scrollerheight='245px' //3000 miliseconds=3 seconds......etc


I figured I'd put <left> at the front of the applet and <right> at the front of the javascript but that just pust the javascript under the applet. I figured I'd have to try some text-flow div type trick but I'm not hip to that stuff.

glenngv
05-09-2005, 07:24 AM
I need to see the javascript code. Maybe just post the link where you got the script. I'm guessing the script uses <div> tag to display the ouput, that's why the output goes below the applet.

brent1a
05-09-2005, 07:29 AM
what I want parallel on the left:

<!-- Applet : Begin -->
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width = "275"
height = "348"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"
name="player">
<param name = CODE value = "javazoom.jlgui.player.amp.PlayerApplet" >
<param name = ARCHIVE value = "lib/jlguiapplet2.3.jar, lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar,lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar" >
<param name="type" value="application/x-java-applet;version=1.3">
<param name="scriptable" value="true">
<param name = "skin" value ="skins/bao.wsz">
<param name = "start" value ="no">
<param name = "song" value ="metal.m3u">
<param name = "init" value ="jlgui.ini">
<param name = "location" value ="all">
<param name = "useragent" value ="winampMPEG/2.7">
<comment>
<embed type="application/x-java-applet;version=1.3"
name="player"
code = "javazoom.jlgui.player.amp.PlayerApplet"
archive = "lib/jlguiapplet2.3.jar,lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar, lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar"
width = "275"
height = "348"
skin = "skins/bao.wsz"
start = "no"
song = "metal.m3u"
init = "jlgui.ini"
location = "all"
useragent = "winampMPEG/2.7"
scriptable=true
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"> <noembed> </COMMENT> </noembed> </embed>
</object>
<!-- Applet : End -->




what I want parallel to that on the right:


<script language="JavaScript1.2"> var scrollerwidth='245px'
var scrollerheight='245px' //3000 miliseconds=3 seconds
var pausebetweenimages=2250
//configure the below variable to change the images used in the slideshow. If you wish the images to be clickable, simply wrap the images with the appropriate <a> tag
var slideimages=new Array()
slideimages[0]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/3O3PE831W5W7G/qid=1113166208/sr=5-2/ref=sr_5_2/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000084U3P.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[1]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/2ZAAITST2NNMS/qid=1113166561/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000002H6C.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[2]='<a href="http://http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/HQO68RICP8GO/qid=1113166695/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000002JOH.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[3]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/29ZHWP9B82260/qid=1113167446/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B0000AGWJ7.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[4]='<a href="http://www.cduniverse.com/sresult.asp?style=music&HT_SEARCH=XARTIST&cart=240683210&HT_SEARCH_INFO=Haunted&HT_Search_Name=Haunted&altsearch=yes"><img src="http://images.amazon.com/images/P/B000007OZM.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[5]='<a href="http://www.cduniverse.com/sresult.asp?HT_Search_Info=killswitch+engage&HT_Search=ARTIST&image.x=10&image.y=10&cart=240683210&style=music&altsearch=yes4"><img src="http://images.amazon.com/images/P/B0006VYF6S.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[6]='<a href="http://www.cduniverse.com/sresult.asp?HT_Search_Info=slipknot&HT_Search=ARTIST&image.x=10&image.y=10&cart=240683210&style=music&altsearch=yes"><img src="http://images.amazon.com/images/P/B00080EU58.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
//extend this list

///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (slideimages.length>2)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=scrollerheight
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll

</script>

glenngv
05-09-2005, 08:29 AM
CSS:

<style type="text/css">
#container{
width:530px;
}
#player{
float:left;
}
#main2{
float:right;
}
#clear{
clear:both;
}
</style>

HTML:

<div id="container">
<object id="player" ...></object>
<div id="main2" style="position:relative;width:245px;height:245px;overflow:hidden;"></div>
<div id="clear"></div>
</div>

brent1a
05-09-2005, 08:34 AM
I appreciate your help......and you're going to think me an idiot but how and where do I exactly place those two sets of codes relative to the two scripts?
thanks again

glenngv
05-09-2005, 08:43 AM
Put the CSS inside the <head> </head> tags. Then put the applet beside the scroller divs which can be found at the bottom of the scroller script. Don't forget to set the <object> id.


<div id="container">
<object id="player" ...></object>
<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>
<div id="clear"></div>
</div>

brent1a
05-09-2005, 08:59 AM
Ok, it's official, I'm stupid. I got the css script in my ,head. section just fine but the other just confuses the crap out of me. So this part:
<div id="container">
<object id="player" ...>

goes:

location = "all"
useragent = "winampMPEG/2.7"
scriptable=true
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"> <noembed> </COMMENT> </noembed> </embed>
<div id="container">
<object id="mp3 player"></object>
<!-- Applet : End -->

correct?

then all that other stuff gets distributed throughout the javascript?
I'm sorry if this makes you mad but I do appreciate your help as I am but a simpleton when it comes to this stuff & all the stuff you have written after the css script makes my head hurt looking at it because I need stupid paint-by-number instructions.

glenngv
05-09-2005, 09:18 AM
<div id="container">
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width = "275"
height = "348"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"
name="player" id="player">
<param name = CODE value = "javazoom.jlgui.player.amp.PlayerApplet" >
<param name = ARCHIVE value = "lib/jlguiapplet2.3.jar, lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar,lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar" >
<param name="type" value="application/x-java-applet;version=1.3">
<param name="scriptable" value="true">
<param name = "skin" value ="skins/bao.wsz">
<param name = "start" value ="no">
<param name = "song" value ="metal.m3u">
<param name = "init" value ="jlgui.ini">
<param name = "location" value ="all">
<param name = "useragent" value ="winampMPEG/2.7">
<comment>
<embed type="application/x-java-applet;version=1.3"
name="player"
code = "javazoom.jlgui.player.amp.PlayerApplet"
archive = "lib/jlguiapplet2.3.jar,lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar, lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar"
width = "275"
height = "348"
skin = "skins/bao.wsz"
start = "no"
song = "metal.m3u"
init = "jlgui.ini"
location = "all"
useragent = "winampMPEG/2.7"
scriptable=true
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"> <noembed> </COMMENT> </noembed> </embed>
</object>
<!-- Applet : End -->

<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>

<div id="clear"></div>

</div>

brent1a
05-09-2005, 09:42 AM
OK so per your code posts I modified this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript">
var ie4 = false; if(document.all) { ie4 = true; }
function getObject(id) { if (ie4) { return document.all[id]; } else { return document.getElementById(id); } }
function toggle(link, divId) { var lText = link.innerHTML; var d = getObject(divId);
if (lText == '+') { link.innerHTML = '?'; d.style.display = 'block'; }
else { link.innerHTML = '+'; d.style.display = 'none'; } }
</script>

<style type="text/css">
body { color: black; background: #888888; }
</style>
</head>

<body>

<p>--under construction--</p>
Sometimes you just need some loud noise.
<br>
<br>
<left/>
<!-- Applet : Begin -->
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width = "275"
height = "348"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"
name="player">
<param name = CODE value = "javazoom.jlgui.player.amp.PlayerApplet" >
<param name = ARCHIVE value = "lib/jlguiapplet2.3.jar, lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar,lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar" >
<param name="type" value="application/x-java-applet;version=1.3">
<param name="scriptable" value="true">
<param name = "skin" value ="skins/bao.wsz">
<param name = "start" value ="no">
<param name = "song" value ="metal.m3u">
<param name = "init" value ="jlgui.ini">
<param name = "location" value ="all">
<param name = "useragent" value ="winampMPEG/2.7">
<comment>
<embed type="application/x-java-applet;version=1.3"
name="player"
code = "javazoom.jlgui.player.amp.PlayerApplet"
archive = "lib/jlguiapplet2.3.jar,lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar, lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar"
width = "275"
height = "348"
skin = "skins/bao.wsz"
start = "no"
song = "metal.m3u"
init = "jlgui.ini"
location = "all"
useragent = "winampMPEG/2.7"
scriptable=true
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"> <noembed> </COMMENT> </noembed> </embed>
</object>
<!-- Applet : End -->
<right/><script language="JavaScript1.2"> var scrollerwidth='245px'
var scrollerheight='245px' //3000 miliseconds=3 seconds
var pausebetweenimages=2250
//configure the below variable to change the images used in the slideshow. If you wish the images to be clickable, simply wrap the images with the appropriate <a> tag
var slideimages=new Array()
slideimages[0]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/3O3PE831W5W7G/qid=1113166208/sr=5-2/ref=sr_5_2/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000084U3P.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[1]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/2ZAAITST2NNMS/qid=1113166561/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000002H6C.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[2]='<a href="http://http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/HQO68RICP8GO/qid=1113166695/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000002JOH.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[3]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/29ZHWP9B82260/qid=1113167446/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B0000AGWJ7.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[4]='<a href="http://www.cduniverse.com/sresult.asp?style=music&HT_SEARCH=XARTIST&cart=240683210&HT_SEARCH_INFO=Haunted&HT_Search_Name=Haunted&altsearch=yes"><img src="http://images.amazon.com/images/P/B000007OZM.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[5]='<a href="http://www.cduniverse.com/sresult.asp?HT_Search_Info=killswitch+engage&HT_Search=ARTIST&image.x=10&image.y=10&cart=240683210&style=music&altsearch=yes4"><img src="http://images.amazon.com/images/P/B0006VYF6S.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[6]='<a href="http://www.cduniverse.com/sresult.asp?HT_Search_Info=slipknot&HT_Search=ARTIST&image.x=10&image.y=10&cart=240683210&style=music&altsearch=yes"><img src="http://images.amazon.com/images/P/B00080EU58.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
//extend this list

///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (slideimages.length>2)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=scrollerheight
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll

</script><right>


<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; visibility=hide>
<layer id="first" left=0 top=1 width=&{scrollerwidth};>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[0])
</script>
</layer>
<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[dyndetermine=(slideimages.length==1)? 0 : 1])
</script>
</layer>
</ilayer>

<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(slideimages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(slideimages[dyndetermine=(slideimages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>
<p align="center"><font face="Arial" size="-4">Click for artist's essential discography!</a></font></p><br>
<div style="border: 1px solid #000000; padding: 0px; background: #999999; "><table border="0" cellspacing="0" cellpadding="2" width="100%" class="Heavy Metal Album" style="background: #000000; color: #FFFFFF; "><tr><td>Heavy Metal Album of the Moment</td><td align="right">
[<a title="show/hide" id="exp1115025433_link" href="javascript: void(0);" onclick="toggle(this, 'exp1115025433');" class="Heavy Metal Album" style="text-decoration: none; color: #FFFFFF; ">?</a>]</td></tr></table>
<div id="exp1115025433" style="padding: 3px;">Under Construction</div>
</noscript>
<script language="javascript">toggle(getObject('exp1115025433_link'), 'exp1115025433');</script>

</body>

</html>



take notice that when I edit the original page the javascript scrols and works until I apply your mods then it goes to this:

brent1a
05-09-2005, 09:48 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript">
var ie4 = false; if(document.all) { ie4 = true; }
function getObject(id) { if (ie4) { return document.all[id]; } else { return document.getElementById(id); } }
function toggle(link, divId) { var lText = link.innerHTML; var d = getObject(divId);
if (lText == '+') { link.innerHTML = '?'; d.style.display = 'block'; }
else { link.innerHTML = '+'; d.style.display = 'none'; } }
</script>

<style type="text/css">
body { color: black; background: #888888; }
#container{
width:530px;
}
#player{
float:left;
}
#main2{
float:right;
}
#clear{
clear:both;
}
</style>
</head>

<body>

<p>--under construction--</p>
Sometimes you just need some loud noise.
<br>
<br>
<left/>
<!-- Applet : Begin -->
<div id="container">
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width = "275"
height = "348"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"
name="player" id="player">
<param name = CODE value = "javazoom.jlgui.player.amp.PlayerApplet" >
<param name = ARCHIVE value = "lib/jlguiapplet2.3.jar, lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar,lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar" >
<param name="type" value="application/x-java-applet;version=1.3">
<param name="scriptable" value="true">
<param name = "skin" value ="skins/bao.wsz">
<param name = "start" value ="no">
<param name = "song" value ="metal.m3u">
<param name = "init" value ="jlgui.ini">
<param name = "location" value ="all">
<param name = "useragent" value ="winampMPEG/2.7">
<comment>
<embed type="application/x-java-applet;version=1.3"
name="player"
code = "javazoom.jlgui.player.amp.PlayerApplet"
archive = "lib/jlguiapplet2.3.jar,lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar, lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar"
width = "275"
height = "348"
skin = "skins/bao.wsz"
start = "no"
song = "metal.m3u"
init = "jlgui.ini"
location = "all"
useragent = "winampMPEG/2.7"
scriptable=true
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"> <noembed> </COMMENT> </noembed> </embed>
</object>
<!-- Applet : End -->
<!-- Applet : End -->
<right/><script language="JavaScript1.2"> var scrollerwidth='245px'
var scrollerheight='245px' //3000 miliseconds=3 seconds
var pausebetweenimages=2250
//configure the below variable to change the images used in the slideshow. If you wish the images to be clickable, simply wrap the images with the appropriate <a> tag
var slideimages=new Array()
slideimages[0]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/3O3PE831W5W7G/qid=1113166208/sr=5-2/ref=sr_5_2/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000084U3P.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[1]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/2ZAAITST2NNMS/qid=1113166561/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000002H6C.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[2]='<a href="http://http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/HQO68RICP8GO/qid=1113166695/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000002JOH.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[3]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/29ZHWP9B82260/qid=1113167446/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B0000AGWJ7.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[4]='<a href="http://www.cduniverse.com/sresult.asp?style=music&HT_SEARCH=XARTIST&cart=240683210&HT_SEARCH_INFO=Haunted&HT_Search_Name=Haunted&altsearch=yes"><img src="http://images.amazon.com/images/P/B000007OZM.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[5]='<a href="http://www.cduniverse.com/sresult.asp?HT_Search_Info=killswitch+engage&HT_Search=ARTIST&image.x=10&image.y=10&cart=240683210&style=music&altsearch=yes4"><img src="http://images.amazon.com/images/P/B0006VYF6S.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
slideimages[6]='<a href="http://www.cduniverse.com/sresult.asp?HT_Search_Info=slipknot&HT_Search=ARTIST&image.x=10&image.y=10&cart=240683210&style=music&altsearch=yes"><img src="http://images.amazon.com/images/P/B00080EU58.01._SCLZZZZZZZ_.jpg" height="245" width="245" border="0"" border="0"></a>'
//extend this list

///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (slideimages.length>2)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=scrollerheight
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll

</script><right>


<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; visibility=hide>
<layer id="first" left=0 top=1 width=&{scrollerwidth};>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[0])
</script>
</layer>
<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[dyndetermine=(slideimages.length==1)? 0 : 1])
</script>
</layer>
</ilayer>

<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>

<div id="clear"></div>

</div>
<p align="center"><font face="Arial" size="-4">Click for artist's essential discography!</a></font></p><br>
<div style="border: 1px solid #000000; padding: 0px; background: #999999; "><table border="0" cellspacing="0" cellpadding="2" width="100%" class="Heavy Metal Album" style="background: #000000; color: #FFFFFF; "><tr><td>Heavy Metal Album of the Moment</td><td align="right">
[<a title="show/hide" id="exp1115025433_link" href="javascript: void(0);" onclick="toggle(this, 'exp1115025433');" class="Heavy Metal Album" style="text-decoration: none; color: #FFFFFF; ">?</a>]</td></tr></table>
<div id="exp1115025433" style="padding: 3px;">Under Construction</div>
</noscript>
<script language="javascript">toggle(getObject('exp1115025433_link'), 'exp1115025433');</script>

</body>

</html>



while the javascript area is now up where it's supposed to be it doesn't currently scroll like before........Therefore I'm not for certain that the javascript is still functional if not just gone altogether in the second page. I AM sure I modified the wrong line or something stupid.

glenngv
05-09-2005, 10:18 AM
You have to move the applet beside the scroller divs and layers (which can be found at the bottom of the page).


<body>

<!--this is the main scroller script (you can also put it inside the head tag -->
<script language="JavaScript1.2">
var scrollerwidth='245px';

...

window.onload=startscroll;

</script>
<!--end of the main scroller script -->


<div id="container">
<!-- Applet : Begin -->
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width = "275"
height = "348"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"
name="player" id="player">
<param name = CODE value = "javazoom.jlgui.player.amp.PlayerApplet" >
<param name = ARCHIVE value = "lib/jlguiapplet2.3.jar, lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar,lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar" >
<param name="type" value="application/x-java-applet;version=1.3">
<param name="scriptable" value="true">
<param name = "skin" value ="skins/bao.wsz">
<param name = "start" value ="no">
<param name = "song" value ="metal.m3u">
<param name = "init" value ="jlgui.ini">
<param name = "location" value ="all">
<param name = "useragent" value ="winampMPEG/2.7">
<comment>
<embed type="application/x-java-applet;version=1.3"
name="player"
code = "javazoom.jlgui.player.amp.PlayerApplet"
archive = "lib/jlguiapplet2.3.jar,lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar, lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar"
width = "275"
height = "348"
skin = "skins/bao.wsz"
start = "no"
song = "metal.m3u"
init = "jlgui.ini"
location = "all"
useragent = "winampMPEG/2.7"
scriptable=true
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"> <noembed> </COMMENT> </noembed> </embed>
</object>
<!-- Applet : End -->

<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; visibility=hide>
<layer id="first" left=0 top=1 width=&{scrollerwidth};>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[0])
</script>
</layer>
<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[dyndetermine=(slideimages.length==1)? 0 : 1])
</script>
</layer>
</ilayer>

<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>

<div id="clear"></div>

</div>

...other contents here

</body>

</html>

The <left> and <right> tags are not needed. In fact there are no such tags in HTML! :eek:

brent1a
05-09-2005, 10:39 AM
Here it is so far, Sweet Mary, Mother of Jesus! I've started with a fresh HTML page and input everything from scratch; I moved & modified everything in the best manner that I could understand your instructions and your code. I still have the same outcome as the last time. Everything is parallel except the javascript is gone while the applet stays (since its embedded I guess). I really appreciate your help and patience but is there ANY other way possible that I could just stick these 2 things on the same line? I simply want them side-by-side. All you need for a couple of pics is a few keystrokes and you can have 5 pictures sitting next to eachother; is there absolutley no way that that can be done with two scripts? This is driving me insane.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript">
var ie4 = false; if(document.all) { ie4 = true; }
function getObject(id) { if (ie4) { return document.all[id]; } else { return document.getElementById(id); } }
function toggle(link, divId) { var lText = link.innerHTML; var d = getObject(divId);
if (lText == '+') { link.innerHTML = '?'; d.style.display = 'block'; }
else { link.innerHTML = '+'; d.style.display = 'none'; } }
</script>

<style type="text/css">
body { color: black; background: #888888; }

#container{
width:530px;
}
#player{
float:left;
}
#main2{
float:right;
}
#clear{
clear:both;
}
</style>
</head>

<body>

<p>--under construction--</p>
Sometimes you just need some loud noise.
<br>
<br>

<center>
<script language="JavaScript1.2">
var scrollerwidth='260px'
var scrollerheight='260px'
//3000 miliseconds=3 seconds
var pausebetweenimages=2250

//configure the below variable to change the images used in the slideshow. If you wish the images to be clickable, simply wrap the images with the appropriate <a> tag
var slideimages=new Array()
slideimages[0]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/3O3PE831W5W7G/qid=1113166208/sr=5-2/ref=sr_5_2/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000084U3P.01._SCLZZZZZZZ_.jpg" height="260" width="260" border="0"" border="0"></a>'
slideimages[1]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/2ZAAITST2NNMS/qid=1113166561/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000002H6C.01._SCLZZZZZZZ_.jpg" height="260" width="260" border="0"" border="0"></a>'
slideimages[2]='<a href="http://http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/HQO68RICP8GO/qid=1113166695/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000002JOH.01._SCLZZZZZZZ_.jpg" height="260" width="260" border="0"" border="0"></a>'
slideimages[3]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/29ZHWP9B82260/qid=1113167446/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B0000AGWJ7.01._SCLZZZZZZZ_.jpg" height="260" width="260" border="0"" border="0"></a>'
slideimages[4]='<a href="http://www.cduniverse.com/sresult.asp?style=music&HT_SEARCH=XARTIST&cart=240683210&HT_SEARCH_INFO=Haunted&HT_Search_Name=Haunted&altsearch=yes"><img src="http://images.amazon.com/images/P/B000007OZM.01._SCLZZZZZZZ_.jpg" height="260" width="260" border="0"" border="0"></a>'
slideimages[5]='<a href="http://www.cduniverse.com/sresult.asp?HT_Search_Info=killswitch+engage&HT_Search=ARTIST&image.x=10&image.y=10&cart=240683210&style=music&altsearch=yes4"><img src="http://images.amazon.com/images/P/B0006VYF6S.01._SCLZZZZZZZ_.jpg" height="260" width="260" border="0"" border="0"></a>'
slideimages[6]='<a href="http://www.cduniverse.com/sresult.asp?HT_Search_Info=slipknot&HT_Search=ARTIST&image.x=10&image.y=10&cart=240683210&style=music&altsearch=yes"><img src="http://images.amazon.com/images/P/B00080EU58.01._SCLZZZZZZZ_.jpg" height="260" width="260" border="0"" border="0"></a>'
slideimages[7]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/3Q7XP5M133EYV/qid=1113153347/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B00005QEO1.01._SCLZZZZZZZ_.jpg" height="260" width="260" border="0"" border="0"></a>'
slideimages[8]='<a href="http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/1FE7A1EAN5BZG/qid=1113153592/sr=5-1/ref=sr_5_1/102-0756550-2908944"><img src="http://images.amazon.com/images/P/B000002O5L.01._SCLZZZZZZZ_.jpg" height="260" width="260" border="0"" border="0"></a>'
//extend this list

///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (slideimages.length>2)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=scrollerheight
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll

</script>

<div id="container">
<!-- Applet : Begin -->
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width = "275"
height = "348"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"
name="player" id="player">
<param name = CODE value = "javazoom.jlgui.player.amp.PlayerApplet" >
<param name = ARCHIVE value = "lib/jlguiapplet2.3.jar, lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar,lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar" >
<param name="type" value="application/x-java-applet;version=1.3">
<param name="scriptable" value="true">
<param name = "skin" value ="skins/bao.wsz">
<param name = "start" value ="no">
<param name = "song" value ="metal.m3u">
<param name = "init" value ="jlgui.ini">
<param name = "location" value ="all">
<param name = "useragent" value ="winampMPEG/2.7">
<comment>
<embed type="application/x-java-applet;version=1.3"
name="player"
code = "javazoom.jlgui.player.amp.PlayerApplet"
archive = "lib/jlguiapplet2.3.jar,lib/jlgui2.3-light.jar, lib/tritonus_share.jar, lib/basicplayer2.3.jar, lib/mp3spi1.9.1.jar, lib/jl0.4.jar, lib/vorbisspi1.0.jar, lib/jorbis-0.0.12.jar, lib/jogg-0.0.5.jar, lib/commons-logging-api.jar"
width = "275"
height = "348"
skin = "skins/bao.wsz"
start = "no"
song = "metal.m3u"
init = "jlgui.ini"
location = "all"
useragent = "winampMPEG/2.7"
scriptable=true
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"> <noembed> </COMMENT> </noembed> </embed>
</object>
<!-- Applet : End -->
<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; visibility=hide>
<layer id="first" left=0 top=1 width=&{scrollerwidth};>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[0])
</script>
</layer>
<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[dyndetermine=(slideimages.length==1)? 0 : 1])
</script>
</layer>
</ilayer>

<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>

<div id="clear"></div>

</div>

<p align="center"><font face="Arial" size="-4">Click for artist's essential discography!</a></font></p><br>
<div style="border: 1px solid #000000; padding: 0px; background: #999999; "><table border="0" cellspacing="0" cellpadding="2" width="100%" class="Heavy Metal Album" style="background: #000000; color: #FFFFFF; "><tr><td>Heavy Metal Album of the Moment</td><td align="right">
[<a title="show/hide" id="exp1115025433_link" href="javascript: void(0);" onclick="toggle(this, 'exp1115025433');" class="Heavy Metal Album" style="text-decoration: none; color: #FFFFFF; ">?</a>]</td></tr></table>
<div id="exp1115025433" style="padding: 3px;">Under Construction</div>
</noscript>
<script language="javascript">toggle(getObject('exp1115025433_link'), 'exp1115025433');</script>

</body>

</html>

glenngv
05-09-2005, 11:05 AM
Does the scroller and applet originally (without my suggested changes) work together?

I'll just show you a simple page to demonstrate the solution.


<html>
<head>
<style type="text/css">
#container{
width:530px;
height:350px;
border:1px solid green;
}
#player{
float:left;
}
#main2{
float:right;
}
#clear{
clear:both;
}
</style>
</head>
<body>
Other content here.
<div id="container">
<div id="player" style="width:275px;height:348px;border:1px solid blue;">left - this uses div and not object tag for demo's sake</div>
<div id="main2" style="position:relative;width:245px;height:245px;overflow:hidden;border:1px solid red;">right</div>
<div id="clear"></div>
</div>
Other content here
</body>
</html>

brent1a
05-09-2005, 11:11 AM
I see what you are trying to do and it would be nice but I don't know why
--I-- can't get it to work.
Yes they work perfectly....all three scripts you can see for yourself here:

http://www.enormousomelet.com/entauthority/musicroom/musicroom.html

chose "New School" then "Heavy Metal" from the dropdown boxes. then go.

Maybe seeing it will help u help me. Hoepfully.

glenngv
05-09-2005, 11:43 AM
I've modified the code and tested it in Firefox and it worked fine.
I don't know why you weren't able to make it work on your side.
I transferred the main scroller script inside the head tag to make it more readable. You can even move it to an external file for easy maintenance. Actually, the page works even if I didn't move the script from the body to head.

brent1a
05-09-2005, 10:40 PM
That works perfectly, apparently all it needed was a professional touch. One small glitch though under IE and Safari the two pieces of java work perfectly next to eachother however, under Mozilla/Firefox/Netscape the embedded player only stays visible when the slider script pauses. I'm guessing this has something to do with them being so close together? Is there a way break the actions of eachother without screwing up everything I already made you do?

glenngv
05-10-2005, 02:41 AM
under Mozilla/Firefox/Netscape the embedded player only stays visible when the slider script pauses.
I visited your site using Firefox 1.0.3 and the player stays visible all the time. It should have nothing to do with its closeness to the slider. Did the player stay visible in your original code before my fix?

brent1a
05-10-2005, 02:46 AM
nevermind then.....it's probably just something with how my mozilla/firefox is set up on my Mac OS X.
thaks A LOT :)