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 ForumsClientAPIClientAPIThink I may have found an error - want to confirmThink I may have found an error - want to confirm
Previous
 
Next
New Post
9/20/2006 12:05 PM
 

Jon - i still get an error and looking at the overloads the first one should work if you create a variable that is a control and find control of ClientAPI.DNNVARIABLE_CONTROLID and use that variable as I did here:

Dim MyVariable As System.Web.UI.Control = Me.Page.FindControl(ClientAPI.DNNVARIABLE_CONTROLID)

Me.lbImg.Attributes.Add("onclick", ClientAPI.GetCallbackEventReference(Me, "'subscribe'", "successFunc", Me.lbImg.ClientID.ToString, "errorFunc", MyVariable))

at least according to the Object Browser

Public Shared Function GetCallbackEventReference(ByVal objControl As System.Web.UI.Control, ByVal strArgument As String, ByVal strClientCallBack As String, ByVal strContext As String, ByVal srtClientErrorCallBack As String, ByVal objPostChildrenOf As System.Web.UI.Control) As String

Member of: DotNetNuke.UI.Utilities.ClientAPI

However I still can not seem to get this to work in Firefox - i still get :

Error: Element.extend is not a function
Source File: http://localhost/dnn_334/js/dnn.js
Line: 909

in the javascript console and nothing happens (meaning alert box pops up) if I do it my way or the one you have here.

 


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
9/20/2006 12:11 PM
 

I never disputed your first one not working, only clarifying your other thread and this one as to why it most likely was not working for you when you passed in the ID.

Like I said earlier, your error is most likely due to you pulling a cached version of dnn.js.

Version 3.3.2 of DNN had this code in the dnn.js file

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);
    else
      ctl = arg;

    if (ctl != null && typeof(Element) != 'undefined')   //if prototype loaded, we must extend the object
        Element.extend(ctl);
       
    if (arguments.length == 1)
      return ctl;

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

Version 3.3.3 contains this fix

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);
    else
      ctl = arg;

    if (ctl != null && typeof(Element) != 'undefined' && typeof(Element.extend) != 'undefined')   //if prototype loaded, we must extend the object
        Element.extend(ctl);
       
    if (arguments.length == 1)
      return ctl;

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

I am guessing that you either have an old version of the file on your server or FireFox is pulling a cached version.

 


 
New Post
9/20/2006 12:28 PM
 

okay well I just downloaded this 3.3.4 - so let me double check that the JS files are the correct ones -

checked

it looks like they are the correct files - redeployed them from the zip of the source package

------

I will reinstall DNN - clear Firefox again and confirm that its still an error (AGAIN)

 


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
9/20/2006 12:38 PM
 

Okay I had cleared Firefox and it still gave me the same error but after reinstalling DNN from scratch and reinstalling the module it worked - not sure why I would have had an old file in a new install but it works now 

 

Thanks for helping me with this -


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIThink I may have found an error - want to confirmThink I may have found an error - want to confirm


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