Results 1 to 10 of 10

Thread: Have I found a bug??

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

    Default Have I found a bug??

    This code: (found at http://www.dynamicdrive.com/dynamicindex14/bgslide.htm ) and written below works great in FireFox and Netscape but does not work in the recent versions of IE....

    Does something have to be added for it to work in IE or is that just the way it is...? Seems odd that it works for every other browser...

    THANKS IN ADVANCE FOR ANY REPLIES!

    <style>
    body{
    /*Remove below line to make bgimage NOT fixed*/
    background-attachment:fixed;
    background-repeat: no-repeat;
    /*Use center center in place of 300 200 to center bg image*/
    background-position: 300 200;
    }
    </style>

    <script language="JavaScript1.2">

    //Background Image Slideshow- © Dynamic Drive (www.dynamicdrive.com)
    //For full source code, 100's more DHTML scripts, and TOS,
    //visit http://www.dynamicdrive.com

    //Specify background images to slide
    var bgslides=new Array()
    bgslides[0]="bgslide.jpg"
    bgslides[1]="bgslide2.jpg"
    bgslides[2]="bgslide3.jpg"

    //Specify interval between slide (in miliseconds)
    var speed=3000

    //preload images
    var processed=new Array()
    for (i=0;i<bgslides.length;i++){
    processed[i]=new Image()
    processed[i].src=bgslides[i]
    }

    var inc=-1

    function slideback(){
    if (inc<bgslides.length-1)
    inc++
    else
    inc=0
    document.body.background=processed[inc].src
    }

    if (document.all||document.getElementById)
    window.onload=new Function('setInterval("slideback()",speed)')

    </script>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    No, works fine here, and I have the most recent full release of IE. Are you using that beta 7?
    - John
    ________________________

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

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Thumbs up

    Hi

    I've checked the script in IE 7 Beta 3 and it worked without any problem.

    Regards

    Code Exploiter

  4. #4
    Join Date
    Aug 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    seems really really odd....it doesnt seem to work for me on IE 6.0 and the IE 7.0 Beta....it does work absolutely fine on FireFox and Netscape as i mentioned though !!

    I have checked on different PC's as well (just in case of some weird cookie problem).

    Is there anything that might be preventing IE from rendering the below code?

    THANKS AGAIN!!!!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I found that with a DOCTYPE, it needs to have units specified for the position but, that doesn't stop it from working (just moves it to the upper left corner). Perhaps something else on your page is causing a problem. Do you have other scripts on your page, style? Does the demo page here at Dynamic Drive work for you in those browsers?
    - John
    ________________________

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

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

    Default

    Yeah i think that something else on the page is creating the problem b/c as you suggested - the dynamicscript.com script works fine on IE 6 and IE 7 so it ought to work for me....

    does seem odd though since i have stripped everything off the page and it did work but it doubled the background image.

    Again, Firefox and Netscape it works abosultey fine...

    I shall endeveour to work something out but if anyone reading this has any ideas that would be great to hear from you.

    Thanks!

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you provide a link to your problem page, I could have a look and see.
    - John
    ________________________

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

  8. #8
    Join Date
    Aug 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John

    I hope you dont mind but i sent you the page via your email...

    Thanks so much for offering to check it out for me!

    TA

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That's OK. I got the email. Here's the weird part though, it works fine. So, either you fixed it or there is some problem with the way your copy(ies) of IE are configured. Be sure that 'Enable' is ticked under the 'Active scripting' item under the 'Scripting' header near the bottom of the 'Custom' settings for 'Security':

    Tools -
    Internet Options -
    Security -

    Custom Level . . . (button)

    scroll near to the bottom:

    Scripting -
    Active Scripting -
    Enable

    If that's OK, it may have something to do with your firewall, are you using Window's Firewall or do you have an add on like Norton, PCTools, etc.? These add on firewalls can sometimes block scripts and/or parts of them.
    - John
    ________________________

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

  10. #10
    Join Date
    Aug 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    Thanks again.

    Right, either i am going completely mad or the tow PC's i have used are set-up in very strange ways.

    I tried to see if the javascript was disabled using the method you suggested - which was fine. I then disbaled the windows firewall and no joy. The PC's that i am using do not have any additional antivirus or such things.

    All seems really really weird that IE has to act that way when the other browsers are fine.....

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
  •