I've been vexing myself trying to figure out what's going on here for
the last few hours.

I'm trying to get the site [url]http://www.bellezzasi.com[/url] set up
to have a sliding menu so that the menu is always present when the
user scrolls down or up.  The script is only active on the following
page (the site is live, so we can only do this on a test page until
everything is working):
[url]http://www.bellezzasi.com/index.php?
option=com_content&view=article&id=49&Itemid=54[/url]

At first I tried using MooTools with Fx.Tween to change the position
as the user scrolled; however, MooTools was far to jerky and glitchy
to use.  Prototype/Scriptaculous with Effect.Move is far more stable
in terms of appearance, so I implemented the latest version of both
(1.6.0.2/1.8.1).

However, IE6 and IE7 both give me the JavaScript error "object doesn't
support this property or method", line 380, char 5 (everything works
for Firefox Mac/Win and Safari for Mac - no errors).

The code being reported is in effects.js and reads:
Effect.Move = Class.create(Effect.Base, {
  initialize: function(element) {
    this.element = $(element);
    if (!this.element) throw(Effect._elementDoesNotExistError);
    var options = Object.extend({
      x:    0,
      y:    0,
      mode: 'relative'
    }, arguments[1] || { });
    this.start(options);
  },
  setup: function() {
    this.element.makePositioned();
    this.originalLeft = parseFloat(this.element.getStyle('left') ||
'0');
    this.originalTop  = parseFloat(this.element.getStyle('top')  ||
'0');
    if (this.options.mode == 'absolute') {
      this.options.x = this.options.x - this.originalLeft;
      this.options.y = this.options.y - this.originalTop;
    }
  },
  update: function(position) {
    this.element.setStyle({
      left: (this.options.x  * position + this.originalLeft).round() +
'px',
      top:  (this.options.y  * position + this.originalTop).round()  +
'px'
    });
  }
});[

Line 380 is this.element.makePositioned(); (yes, I've accounted for
Microsoft's stupidity about line numbers; see below).  As best I can
tell however, the problem is not actually with makePositioned but with
getStyle and setStyle, because if I stop the setup function from
running (comment it out), the update function starts to have errors
next, and it also uses setStyle.

Has anybody else had this issue?  I'm not really sure what to do, I've
tried just about everything.

Things I've tried/Notes:
1) Removing MooTools include from Joomla/gallery component. Didn't
help.
2) Changing $(element) to document.getElementById(element), in case
there was $ conflict between MooTools and P/ST.
3) Current version of ProtoSafe to make sure there weren't any
MooTools/Prototype&ST conflicts.  Didn't help a lick.
4) Some of you might observe that the CSS position attribute for the
'left' div is not set in the IE6 CSS, and might think that this is
causing the issue.  However, position is set to absolute in IE7, so if
this were the problem, IE7 would not have the issue; it does, however.
5) For the IE line number for the error, yes, I did account for its
botched determination of line numbers.  I tested around the general
area of the line number it gave, adding a new line before the error
spot until I found that the line number was the original one reported
when I was adding the new line.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to