SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jan 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Marquee not working in Chrome and FF

    Hello, Im basically a novice user and Im facing a problem regarding marquee on a php page. The server is running on LINUX
    The marquee is displaying fine in IE but it simply doesn't show anything in Chrome and FF.
    I know that the script is written for IE only, which takes its content from an external php file. Can anyone please modify this code to work on Chrome and FF
    I have tried using different scripts but i am having serious difficulties linking to the external php file, which is a must.
    Thanks in advance


    <!--[if IE]>

    <IEownload ID="marqueedata" STYLE="behavior:url(#default#download)" />
    <marquee id="externalmarquee" direction=up scrollAmount=1 style="width:210px;height:150px; background:; font-size:1; border:0px solid ; padding:3px" onMouseover="this.scrollAmount=0" onMouseout="this.scrollAmount=1" src="/edit_news/news.php">
    </marquee>


    <script language="Javascript" type="text/javascript">

    function downloaddata(){
    marqueedata.startDownload(externalmarquee.src,displaydata)
    }

    function displaydata(data){
    externalmarquee.innerHTML=data
    }

    if (document.all)
    window.onload=downloaddata

    <![endif]-->

    </script>

  2. #2
    SitePoint Member
    Join Date
    Jan 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did it. Thanks any ways people.
    Mods please close the thread

    <MARQUEE onmouseover=this.stop() onmouseout=this.start()
    scrollAmount=1 direction=up width="210" height=150>
    <?php $fp = file("news.php");
    for($i = 0; $i <sizeof($fp);$i++){
    echo $fp[$i]."<BR>";
    } ?>
    </MARQUEE>

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    187
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome! Now if you only read where you post your topics at, since this is about designing PHP apps, not "help solving my javascript problem"

  4. #4
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,026
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    Marquee -- I haven't seen that in years.

    That element is not valid HTML 4.x or later having been deprecated some time ago. This means that browsers may drop support for it in the future, your pages will not validate now, which forces the browser into quirks mode and may cause unpredictable layout bugs to crop up from browser to browser.

    For the record, the tag was never part of a valid HTML spec, but an IE proprietary tag. That it works at all in any other browser surprises me a bit.

    My advice would be to drop usage of the tag along with blink, under construction gifs and other gimmicks from the 90's. Moving text is EXTREMELY distracting on a website and brings up major usability concerns, not to mention making the printing of the page difficult to impossible, depending on the amount of text in the marquee.

    And as furicane noted - this is the wrong forum by quite a margin. This goes in the HTML forum or the javascript forum.

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,807
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    It is easy enough to fix Internet Explorer so that it treats the marquee tag the same way as other browsers do by adding a line to the CSS you attach to all web pages through the accessibility option.

    Any marquee functionality should be done completely unobtrusively via an external JavaScript.

    Also the code that you have still isn't going to provide the marquee functionality in browsers other than IE. See http://javascript.about.com/library/blctmarquee1.htm for a version written in JavaScript that works across all modern browsers (without using that non-existent marquee tag).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •