Results 1 to 5 of 5

Thread: Can Cross Browser marquee II load data from external source?

  1. #1
    Join Date
    May 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Can Cross Browser marquee II load data from external source?

    1) Script Title: Cross Browser marquee II

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/cmarquee2.htm

    3) Describe problem: Is it possible for the above script to display contents from an external source such as an html or txt document? If so, can someone please show me how to modify the code to do so? Thanks so much in advance!!!


    PS --I did check out the script located at http://www.dynamicdrive.com/dynamicindex2/emarquee.htm and it doesnt appear to work in firefox/netscape. I also checked out the iframe scroller and I dont really like that one as much as the Cross Browser marquee, so if at all possible I would like to use this particular script.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,000
    Thanks
    44
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    This can probably be worked out to some extent in javascript using xml or document.write(), or perhaps iframe*. However, if you have a server side language like PHP or asp available to you, that would be a much better way to go for importing a separate content file, as (at least as far as the importation part goes) it would be compatible with all browsers, even those that don't support the script.

    The other script you mention is IE only.


    * http://www.dynamicdrive.com/dynamici...e-scroller.htm
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ladyviola (05-10-2008)

  4. #3
    Join Date
    May 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your support! Would you happen to know how to implement it or modfy the code? I do have PHP available. I did see a similar script on DD that uses iframes but I really would like to avoid using iframes if at all possible. Thanks again!!!

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,000
    Thanks
    44
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    Just use an include where it calls for this:

    Code:
    <div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
    <div id="vmarquee" style="position: absolute; width: 98%;">
    
    <!--YOUR SCROLL CONTENT HERE-->
    
    <h4>Your scroller contents</h4>
    
    <!--YOUR SCROLL CONTENT HERE-->
    
    </div>
    </div>
    like:

    Code:
    <div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
    <div id="vmarquee" style="position: absolute; width: 98%;">
    
    <!--YOUR SCROLL CONTENT HERE-->
    
    <?php
    include 'content.php';
    ?>
    
    <!--YOUR SCROLL CONTENT HERE-->
    
    </div>
    </div>
    Your top page with the javascript and the above on it will need the .php extension unless your server parses .htm and .html as PHP (most don't). The content.php can be just ordinary text or HTML, but can have valid PHP code on it if you like.

    For more on the PHP include:

    http://www.google.com/search?hl=en&c...de&btnG=Search
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ladyviola (05-12-2008)

  7. #5
    Join Date
    May 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Ah, that makes sense. I will try it! Thank you!!!

    ETA: OMG it works like a charm! you're a genius Thank you!!
    Last edited by ladyviola; 05-12-2008 at 07:23 AM.

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
  •