Results 1 to 2 of 2

Thread: Need to Combine 2 Scripts

  1. #1
    Join Date
    Aug 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need to Combine 2 Scripts

    1) Script Title:
    Ajax XML Ticker (txt file source)

    and

    Pausing RSS scroller

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ajaxticker.htm

    and

    http://www.dynamicdrive.com/dynamici...ller/index.htm

    3) Describe problem:
    I have a client that likes the look of the Pausing RSS Scroller (one line scrolling up at a set time interval), but that doesn't have a lot of coding knowledge and wants to be able to update content themselves (possibly on a daily basis).

    So, I would like to be able to combine the ability to use content generated from a text file (like in the Ajax XML Ticker (txt file source)) with the scrolling ability.

    Anyone have a suggestion to implement this? Thanks very much.

  2. #2
    Join Date
    Aug 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have found a temporary solution to my problem, and here's the code in case anyone else finds it useful.

    In this example I am using the Pausing up-down Scroller found here:
    http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

    In order to have a text document that someone can edit the items in the array, use this code:

    Code:
    <script type="text/javascript" src="text.txt">
    </script>
    In place of this:

    Code:
    var pausecontent=new Array()
    pausecontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!'
    pausecontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.'
    pausecontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'
    Take that code, and put it into your "text.txt" file.

    When the page loads, it will read you text file and work properly.

    One important note is to make sure you comment out any single quotes in your array items that are not the beginning and end single quotes.

    As in the case of using a contraction like "don't" the ' has to have a backslash in front of it like this:

    "don\'t"

    in order to work properly.

Bookmarks

Posting Permissions

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