Results 1 to 4 of 4

Thread: Script Error in IE - Button Positioning

  1. #1
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Script Error in IE - Button Positioning

    1) Script Title: Step Carousel Viewer v1.4

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...epcarousel.htm

    3) Describe problem:

    I've set up this script on the domain twice[nospacehere]bright[dot]com and it works well.

    In Firefox, Opera and in Safari everything is beautiful. In IE, of course, it's not. The script works but there is a Javascript error that I have tracked down to the buttons.

    First of all let me say that passing the positioning of the buttons did not work so well for this layout on this page so I went into the script and manually positioned them.

    I changed these two lines in the script. They're recognizably the two lines of code for positioning the buttons.

    <code>
    config.jQueryleftnavbutton=jQuery('<img src="'+config.defaultbuttons.leftnav[0]+'">').css({zIndex:50, position:'absolute', left:'6px', top:'60px', cursor:'hand', cursor:'pointer'}).attr({title:'Back '+config.defaultbuttons.moveby+' panels'}).appendTo('#carousel')
    config.jQueryrightnavbutton=jQuery('<img src="'+config.defaultbuttons.rightnav[0]+'">').css({zIndex:50, position:'absolute', left:'380px', top:'60px', cursor:'hand', cursor:'pointer'}).attr({title:'Forward '+config.defaultbuttons.moveby+' panels'}).appendTo('#carousel')
    </code>

    Without it being done this way the buttons do not ever show up on the page. If I do it this way the buttons show up but I get a vague error from IE.

    I tried with v 1.6.1 of the script and neither way would allow me to have buttons so that is why I'm using the 1.4 version.

    As a side note... I am also using Multibox which uses jQuery and am using the jQuery.NoConflict() statement in the code.

    I hope that someone out there can see what is wrong.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

  3. #3
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I did actually... I just don't want it coming up in search results...

    http://www.twicebright.com

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Are you sure the error is due to the change you had made above? That is, if you revert:

    Code:
    config.jQueryleftnavbutton=jQuery('<img src="'+config.defaultbuttons.leftnav[0]+'">').css({zIndex:50, position:'absolute', left:'6px', top:'60px', cursor:'hand', cursor:'pointer'}).attr({title:'Back '+config.defaultbuttons.moveby+' panels'}).appendTo('#carousel')
    config.jQueryrightnavbutton=jQuery('<img src="'+config.defaultbuttons.rightnav[0]+'">').css({zIndex:50, position:'absolute', left:'380px', top:'60px', cursor:'hand', cursor:'pointer'}).attr({title:'Forward '+config.defaultbuttons.moveby+' panels'}).appendTo('#carousel')
    back to the original code chunk, the error in IE disappears? Doing a side by side comparision, it seems the main change you made was just to replace all occurrences of $ with jQuery. Try replacing the following line in your code:

    Code:
    this.addnavbuttons(config, config.currentpanel)
    to:

    Code:
    var $navbuttons=this.addnavbuttons(config, config.currentpanel)
    BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: http://www.dynamicdrive.com/notice.htm
    DD Admin

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
  •