Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Call external javascript in javascript scroller

    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)


    Code:
    <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:

    Code:
    <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

  • #2
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.ht...olling_content

    So my content now looks like

    Code:
    <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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •