Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Errors on page with slideshow script

  1. #1
    Join Date
    Aug 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Errors on page with slideshow script

    Hi!

    I have a slideshow script at the following url:

    http://www.opusexpo.co.uk/hayleyneil...riel/index.htm

    The slideshow seems to be working fine but Internet Explorer says there is an error on the page? Any ideas of what it is?

    Please help!

    Thanks

    Matthew

  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 error here, what version IE are you using?
    - John
    ________________________

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

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Click the little error sign in the corner for more details on the error.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Aug 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi!

    my ie version is 6.0.2900.2180.

    The error comes up as:

    Line: 60
    Char: 1
    Error: Object required
    Code: 0
    URL: http://www.opusexpo.co.uk/hayleyneil...riel/index.htm

    Very frustrating!

  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

    Still no error here, I have the same version, possibly with a later service pak. When and where does the error occur? Does it happen when viewing the page online or just locally? Does it happen when the page loads or after you interact with it in some way, what way?
    - John
    ________________________

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

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

    Default

    It occurs online and locally (although obviously a local url is displayed in the error message for local access) and the error displays immediately when the page is loaded.

  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

    Does it happen when you click on the link to it from your post? Not here but, if I go 'home' and hit back or navigate to it from within your site, I do get the error. It is not on line 60 of the page itself though, if you add blank lines at the top it is still line 60. This means it is in one of the linked files, probably a script. To find which one, put all the external scripts right on the page. Then the error should point to the actual line, or as often is the case with script errors, the line after the problem.
    - John
    ________________________

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

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

    Default

    Okay, i've put the new url at:

    http://www.opusexpo.co.uk/hayleyneil...ariel/test.htm

    and it shows the error as line 417, char 1. I still dont see the problem, though i;m not particularly good at javascript.

    Any ideas?

  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 did it! Find this function (it's in the ariel_slideshow.js):

    Code:
    function getpos(){
    leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
    toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
    if (window.opera){
    leftpos-=screenLeft
    toppos-=screenTop
    }
    }
    replace it with this one:
    Code:
    function getpos(){
    leftpos=(detectexist(window.screenLeft))? screenLeft+document.documentElement.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
    toppos=(detectexist(window.screenTop))? screenTop+document.documentElement.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
    if (window.opera){
    leftpos-=screenLeft
    toppos-=screenTop
    }
    }
    That will take care of that error. Others may present themselves but, let's worry about that if it happens.
    - John
    ________________________

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

  10. #10
    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 played around with that script some more and like this variation much better. It centers the popups horizontally and sizes the popup window to the picture. (just replace from the start here to the end of the original script):

    Code:
    //do NOT edit pass this line
    
    ////center popup code////////////
    
    function detectexist(obj){
    return (typeof obj !="undefined")
    }
    
    function getpos(){
    leftpos=(detectexist(window.screenLeft))? screenLeft+document.documentElement.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
    toppos=(detectexist(window.screenTop))? screenTop+document.documentElement.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
    if (window.opera){
    leftpos-=screenLeft
    toppos-=screenTop
    }
    }
    
    getpos()
    var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,left='+leftpos+',top='+toppos
    
    /////end center popup code///////
    
    var preloadedimages=new Array()
    for (i=0;i<photos.length;i++){
    preloadedimages[i]=new Image()
    preloadedimages[i].src=photos[i]
    }
    var preloadedlinks=new Array()
    for (i=0;i<photoslink.length;i++){
    preloadedlinks[i]=new Image()
    preloadedlinks[i].src=photoslink[i]
    
    
    }
    
    
    function applyeffect(){
    if (document.all && photoslider.filters){
    photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
    photoslider.filters.revealTrans.stop()
    photoslider.filters.revealTrans.apply()
    }
    }
    
    
    
    function playeffect(){
    if (document.all && photoslider.filters)
    photoslider.filters.revealTrans.play()
    }
    
    function keeptrack(){
    window.status="Image "+(which+1)+" of "+photos.length
    }
    
    
    function backward(){
    if (which>0){
    which--
    applyeffect()
    document.images.photoslider.src=photos[which]
    playeffect()
    keeptrack()
    }
    }
    
    function forward(){
    if (which<photos.length-1){
    which++
    applyeffect()
    document.images.photoslider.src=photos[which]
    playeffect()
    keeptrack()
    }
    }
    
    function transport(){
    if (!window.opera){
    leftpos=(detectexist(window.screenLeft))? screenLeft+document.documentElement.offsetWidth/2-Math.floor((preloadedlinks[which].width+20)/2) : detectexist(window.screenX)? screenX+innerWidth/2-Math.floor((preloadedlinks[which].width+20)/2) : 0
    winattributes='width='+(preloadedlinks[which].width+20)+',height='+(preloadedlinks[which].height+20)+',resizable=yes,left='+leftpos+',top='+toppos
    }
    window.open(photoslink[which],"",winattributes)
    }
    - John
    ________________________

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

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
  •