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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...JavaScript killing my siteJavaScript killing my site
Previous
 
Next
New Post
2/10/2013 5:37 PM
 

Hi all,

  I am just reskinned my site using the default DarkKnight skin. I have made a few layout changes but on the whole are happy with the way things are going. This was until I noticed some Javascript is killing my site. I am using DNN 07.00.02 (1) and the javascript I am using is a light box script:


<script type="text/javascript" src="http://www.loreofmythos2.com/portals/0/includes/prototype.js"></script>
    <script type="text/javascript" src="http://www.loreofmythos2.com/portals/0/includes/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="http://www.loreofmythos2.com/portals/0/includes/lightbox.js"></script>
    <link rel="stylesheet" href="http://www.loreofmythos2.com/Portals/0/css/lightbox.css" type="text/css" media="screen" />

[a href="http://www.loreofmythos2.com/portals/0/Images/Controls/GW2_Key_Sheet_Large.jpg" rel="lightbox[Controls]"> [img alt="" src="http://www.loreofmythos2.com/portals/0/Images/Controls/GW2_Key_Sheet_Small.jpg" />

(I changed the < to a [ as I couldn't stop the images from rendering)

The JavaScript does work perfectly I put the top piece of code in teh HEAD section of the HTML module and the rest in the contact of the module (rendered as both HTML and RAW)

The problem I have is that the ribbon bar at the top stops working and the menu links on my site stop working. For an example please look at the page: http://www.loreofmythos2.com/Game/Professions/Elementalist.aspx  The JavaScript images are on the right hand side. You will see none of the menu links at the top work. However for example go to here: http://www.loreofmythos2.com/Game/DynamicEvents.aspx  and all is good.

Please can someone help me as I need the Javascript to work as the lightbox I use is very useful.
Thanks

 
New Post
2/10/2013 5:51 PM
 
DNN uses the jQuery javascript library.

I don't know anything about the prototype and scriptaculous libraries that are on the page. I think it's a reasonable guess that between them those libraries conflict in some way with jQuery.

It may be easy to fix the conflict. Try Google. The easiest answer might be to use a jQuery based lightbox script instead of your current one. In principle that might speed up your site a little by reducing the amount of javascript on the page.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
2/10/2013 8:09 PM
 

I would suggest that you look at using a jQuery based lightbox - scriptaculous is known to have conflicts with jQuery.  And DNN as such uses jQuery extensively for its native UI.  

Both jQuery and scriptaculous use $() as their shortcut macro - so what would be happen on your site is that all the dnn ui calls that use $() would wind up calling scriptaculous instead of jquery.

All of the lightbox jquery plugins here should work with DNN - http://www.designyourway.net/blog/resources/30-efficient-jquery-lightbox-plugins/

 

 

 
New Post
2/13/2013 11:54 AM
 

All correct above, if you would still like to use any other library with jquery you may need to use the jquery no-conflict method. I'm not too sure about other libraries but have successfully used this with mootools. 

See: http://api.jquery.com/jQuery.noConflict/

 

 

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...JavaScript killing my siteJavaScript killing my site


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