Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPI4.3.0 And Script.aculo.us4.3.0 And Script.aculo.us
Previous
 
Next
New Post
6/14/2006 9:56 PM
 
After upgrading to 4.3.0 I am now getting this error from effects.js in the Script.aculo.us library

Error: $(element) has no properties
Source File: effects.js
Line: 76

Which would be:

Element.getInlineOpacity = function(element){ 
  return $(element).style.opacity || '';
}

Any thoughts on what might have changed, and what I can do to correct it. Thanks in advance.

 
New Post
6/15/2006 9:33 AM
 
I see you added your own $() notation to the ClientAPI, so I suspect that is the issue, still looking....
 
New Post
6/15/2006 9:52 AM
 
What is the suggest course of action if we are using other .js libraries that also emplore the $(element) functionality? The two are not playing nice at all.
 
New Post
6/15/2006 11:23 AM
 

Thats a good question.  This was the whole reason I broke everything out into separate namespaces.  When deciding to implement the $ to begin with, I figured I'd make sure it worked with what MS included in Atlas and what was placed in prototype.js...  See this blog entry for more info in this decision.

I suppose it comes down to who should win the right to use a given name.  For example, even though the ClientAPI uses namespaces, I still reserve certain root elements.  If another library decided to redefine the dnn variable that is the root of the namespacing, the whole ClientAPI would no longer function.

As to what to do when different libraries decide to implement the same functions in a different manner, I don't have an answer.  Do you have any suggestions?


 
New Post
6/15/2006 11:33 AM
 
Well Script.aculo.us uses the prototype library as well, so I am not sure it why it is not handled since you say you specifically tested against Atlas & Prototype. I think it is a little unreasonable to perceive that no one will ever use another library that has $(element) since as you noted the big boys already have this built in. I did already read your blog post, and probably should have thought of this before this point, but it never occured to me (I am no js wizard such as yourself;). As to how to resolve this issue I am unsure, would it be possible to add some check to your routine

//-- prototype/atlas shorthand functions
function $()
{
  var ary = new Array();
  for (var i=0; i<arguments.length; i++)
  {
    var arg = arguments[i];
    var ctl;
    if (typeof arg == 'string')
      ctl = dnn.dom.getById(arg);

    if (arguments.length == 1)
      return ctl;

    ary[ary.length] = ctl;
  }
  return ary;
}

to check and see if other libraries are loaded before calling this functionality. I have been looking at this, this morning and it seems the problem is that the dnn client api picks up the $(element) first, and has already performed its duties by the time it passes control off to Script.aculo.us. I can provide you with a module using Script.aculo.us to test this if that is helpful.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPI4.3.0 And Script.aculo.us4.3.0 And Script.aculo.us


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out