DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Remove jQuery ClientScript programmatically

 3 Replies
 0 Subscribed to this topic
 15 Subscribed to this forum
Sort:
Author
Messages
New Around Here Send Private Message
Posts: 1
New Around Here
Hello,
in a particular template (skin) I don't want jQuery library nor jQueryUI,
so I would like to remove the client libraries injected by DNN.
I've read that is possible configure different version of jQuery but I would like to remove them programmatically at the Page_Load of the skin.
Is there some sort of function like Page.ClientScript.RegisterClientScriptInclude to unregister client library?
For example Page.ClientScript.UnregisterClientScriptInclude(...)?
 
thanks in adavance
 
Luca

 

Veteran Member Send Private Message
Posts: 350
Veteran Member
Luca, you can disable "popups" (SETTINGS > Site Settings > Site Behavior > More > "Enable Popups") to keep DNN from injecting jQuery . Also, if you are using the SEARCH theme object, it will cause jQuery to be loaded.

David Poindexter


Creator:


Veteran Member Send Private Message
Posts: 350
Veteran Member
Oh, and you can also use the DNNJSEXCLUDE theme object if you don't want to, or can't, disable popups.

David Poindexter


Creator:


Senior Member Send Private Message
Posts: 1551
Senior Member

In addition to David's excellent advice, the StyleHelper theme object by 40Fingers is a great way to fine-tune all kinds of things on your DNN site, including what scripts do and don't get loaded.  But, it's important to still follow the previous advice.  This is just a powerful tool to help you do that and more.  

These Forums are dedicated to the discussion of DNN Platform.

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

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. 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.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved