...

View Full Version : Call external javascript in javascript scroller



foxyfmu
10-19-2008, 08:28 PM
Hey all, hopefully someone can help me here!

I have this vertical scroller:
(i've chopped it so this post isn't huge, to see the whole script http://www.javascriptkit.com/script/...scroller.shtml)



<script language="javascript">
//Vertical Scroller v1.2- by Brian of www.ScriptAsylum.com
//Updated for bug fixes
//Visit JavaScript Kit (http://javascriptkit.com) for script
//ENTER CONTENT TO SCROLL BELOW.
var content='CONTENT';
var boxheight=150; // BACKGROUND BOX HEIGHT IN PIXELS.
var boxwidth=290; // BACKGROUND BOX WIDTH IN PIXELS.
var boxcolor="#FFF6e9"; // BACKGROUND BOX COLOR.
var speed=50; // SPEED OF SCROLL IN MILLISECONDS (1 SECOND=1000 MILLISECONDS)..
var pixelstep=2; // PIXELS "STEPS" PER REPITITION.
var godown=false; // TOP TO BOTTOM=TRUE , BOTTOM TO TOP=FALSE
</script>

Then I have this that I want as the content to scroll but as yet I can't find a way to put javascript inside javascript:


<script src="http://www.myfootballnews.co.ukfeednews.js?feed_id=9992438&conf=9a303">
</script>

I've tried "\/" and breaking it up as in </scr"+"ipt> to no avail. Thanks in advance

foxyfmu
10-20-2008, 10:17 PM
Update:

OK so I have partly fixed this. I think the answer should be easier now.

I have implemented this:
http://www.dhtmlgoodies.com/index.html?whichScript=scrolling_content

So my content now looks like



<div id="scrollingContainer">
<div>
<p><script src="http://www.myfootballnews.co.ukfeednews.js?feed_id=9992438&conf=9a303">
</script></P>
</div>
</div>
<script type="text/javascript">
initSlidingContent('scrollingContainer',3);
</script>


I defined the height in the css. But if you go to http://forevermanutd.com you can see that the whole script loads without any thought for the height attribute I put in the css. How can I make sure the script doesn't stretch the whole page?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum