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...Administration ...Administration ...Is there anyway to #INCLUDE a file from the Text/Html Module?Is there anyway to #INCLUDE a file from the Text/Html Module?
Previous
 
Next
New Post
7/20/2007 2:34 PM
 

I have some javascript and html code that I need to reference from multiple portals and I'd like to do this by having the code in a central file and just including that file from the html of the Text/Html module (or some other module...).  Is this possible?  I am not wanting to have to create a custom module for this, but instead use a core module.  Any ideas?

Thanks!

Ian

 
New Post
7/20/2007 4:32 PM
 

I don't think there's any easy way to include an external HTML reference in the Text/HTML module.  You could consider using an IFrame, if that would fit your needs.  You will have to mess around with the height and width settings, but I would think that might be your easiest bet, using the IFrame module.

If you want to do it inside of a Text/HTML module, you could convert your HTML into a javascript string (or multiple strings) and call document.write from javascript to write those elements on the page.  Then you'd only have to make a reference to your javascript file, and it would create the HTML.  See the OpenForce badges for reference.

Hope it helps!


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
7/20/2007 5:04 PM
 

Thanks.  I tried the IFrame route, but the problem is that I need to reference the JavaScript functions from other modules which doesn't seem to be possible if the scripts are in an IFrame.  If there's a way to do this, let me know.

Thanks!

Ian

 
New Post
7/20/2007 5:07 PM
 

Well, the easiest would probably be to just reference the javascript from a Text/HTML module and the HTML from an IFrame (and maybe the javascript in the IFrame, also, if your HTML uses it).  Otherwise, I think you're looking at using javascript to inject the whole thing.


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Is there anyway to #INCLUDE a file from the Text/Html Module?Is there anyway to #INCLUDE a file from the Text/Html Module?


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