SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with background under Opera

    Hallo everybody,

    I have big problem. I've written the script to rand the backgrounds but it doesn't work under Opera and I don't know why and what to do.
    Please take a look here is my page with script:
    KLICK
    here is the script:
    KLICK
    and here is also the exaple of script that works in all browsers:
    KLICK

    Thanks for help,
    Tommy_

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,460
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)

    background

    HTML Code:
    document.getElementById( layer ).style.backgroundImage = "url("+imageUrl+")";
    vs.
    HTML Code:
    document.getElementById("block1").style.background="url("+pic[i]+")";
    ????

  3. #3
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've allready try it but it doesn't help... Any more ideas?

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,460
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)

    onload

    It may be the way Opera handles the "body onload". It may work in Opera if instead of
    HTML Code:
    <body onload="rand();">
    you call the function at the end of the body like this
    HTML Code:
    <script type="text/javascript"> 
    <!-- 
    s4uext=s4upl(); 
    document.write('<img alt="" src="http://stat.4u.pl/cgi-bin/s.cgi?i=minimaldesigns'+s4uext+'" width="1" height="1">');
    rand();
    //--> 
    </script>

  5. #5
    &#083;itePoint Aficionado JVLB's Avatar
    Join Date
    Jan 2002
    Location
    N 44 56.537' W 123 3.683'
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using the setAttribute method instead of directly assigning the property.

    Another thing to try is clearing your timeout before resetting it.
    Last edited by JVLB; Jun 25, 2006 at 10:28.


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
  •