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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0why the why the 'dnn' is not 'undefined'?
Previous
 
Next
New Post
11/27/2007 8:34 PM
 
I am baffled.  I have cases where the dnn.js loads on pages and sometimes it does not. I cannot figure out what makes it load versus what does not. 
 
To further complicate, one page may not load the dnn.js for a anonymous user, but when the regula the admin logs in it loads the dnn.js in the source.

Any help will be appreciated much! Thanks a lot! Need manual register the namespace in the code? like that:

 If ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.XMLHTTP) _
              
AndAlso ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.XML) Then
                ClientAPI.RegisterClientReference(
Me.Page, ClientAPI.ClientNamespaceReferences.dnn_xml)
                ClientAPI.RegisterClientReference(
Me.Page, ClientAPI.ClientNamespaceReferences.dnn_xmlhttp)

               ClientAPI.RegisterClientReference(Me.Page, ClientAPI.ClientNamespaceReferences.dnn)
End


sunblognuke v5 for dnn

Ultimate Blogging Module for DotNetNuke Platform
The professional provider of DotNetNuke support, skin design and custom module development.

 
New Post
11/28/2007 9:26 AM
Accepted Answer 

dnn.js is loaded whenever a piece of code requests it to be loaded.  For example, if your skin has its module action menus using DNNMenu, then the DNNMenu control will ask for the dnn.js to register itself to work, and it will only do so when the menu is rendered (when you log in as admin/host).   Also, if you have a module that uses the ClientAPI in some way it will also be registered. 

So if you are writing code that needs the dnn.js, then you must register it.   In the same manner, if you need code that uses the xmlhttp namespace, you must register it like you mentioned above.


 
New Post
11/28/2007 11:27 PM
 

Thanks a lot ! Right now I have understand the dnn.js register mechanism ! Just I can code to register like that in my module's Page_Load Event:

                'Requires at a bare minimum the dnn namespace, so regardless of wheter the ClientAPI is disabled of not we
                'need to register it.
                ClientAPI.RegisterClientReference(Me.Page, ClientAPI.ClientNamespaceReferences.dnn)

 


sunblognuke v5 for dnn

Ultimate Blogging Module for DotNetNuke Platform
The professional provider of DotNetNuke support, skin design and custom module development.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0why the why the 'dnn' is not 'undefined'?


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