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

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Incorporating 3rd party javascript into my siteIncorporating 3rd party javascript into my site
Previous
 
Next
New Post
4/23/2010 6:28 AM
 

 Hi all

 

I hope this is in the right section..

I'm trying to call a js file and its associated CSS into an article on my site, but its not working as it should.

 

The script appears to be loaded correctly, but I cannot seem to call it in to my site correctly. Any one know a better way than I have here of calling what should be:

<body onload="slideMenu.build(’sm’, 200, 10, 10, 1);"> 

?

 

I've tried jQuery and normal javascript to call directly into my article, like this

 

<script type=”text/javascript”>
$
(document).ready(function(){
slideMenu
.build(’sm’, 200, 10, 10, 1);
});
</script> and
<script type=”text/javascript”>
window
.onload = function(){
slideMenu
.build(’sm’, 200, 10, 10, 1);
}
</script>

 

If anyone could shed some light on this it would be much appreciated.

 

Thanks

John Lewis

 
New Post
4/24/2010 1:23 PM
 

I too saw a problem when trying to use js. This strongle depends on browsers. There were cases when it worked correctly in Opera and Chrome, nothing shown in Firefox and many errors in IE (in js modules of DNN itself).

 
New Post
4/26/2010 10:44 AM
 

Glad I'm not on my own then, cheers for letting us know. Did you ever solve your issues?

I fail to believe nobody on this forum has tried this before - using public domain web scripts that people use every day inside a CMS must have been touched upon. I'm a pretty advanced user of Drupal and Joomla and this should be easy.

Come on community, can anyone throw us a bone here please? How do YOU add your javascripts and call it in?

 
New Post
4/26/2010 11:16 AM
 

The document.ready is how I do all my javascript stuff at page load. Works for me without a problem in all browsers.

Have you tested it with an alert{"test"}; to see if it's working and not a problem in the slide menu?

 
New Post
4/26/2010 11:29 AM
 

When calling jQuery functions, use jQuery(blah) rather than the $(blah) notation.  It has been my experience that the $ notation does not work in DNN due to namespace pollution issues.  This may also help to solve your issue.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Incorporating 3rd party javascript into my siteIncorporating 3rd party javascript into 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