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...Adding javascript to a page ..Adding javascript to a page ..
Previous
 
Next
New Post
7/30/2006 12:57 PM
 

 

At the top of the html/text module you can switch between "Basic Text Box" and "Rich Text Editor".

I don't think we want to encourage a practice that goes against standards by making a module specifically for injecting javascript anywhere in the page.

It is much better to have an external JS file and link to it in the head section.


DotNetNuke Modules from Snapsis.com
 
New Post
7/30/2006 1:04 PM
 

HI:

I see what you mean about the rich text and text .. yet another place to look for subtle choices .. maybe it that box should be down at the bottom with the tabs?

Anyway, I'm not sure what javascript standards you are thinking about, but there are a heck of a lot more places you may want to (or have to) put javascript than just the head section.

Ya know what I mean?

 
New Post
7/30/2006 1:08 PM
 
fkxfkxfkxfkx wrote

but maybe there needs to be a new module? An "add javascript to wherever" module?



The Smart-Thinker Utilities module allows you to enter ahdoc JScript and it puts it in the right place - but it's nothing you can't do with an HTML module as John says

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
8/8/2006 3:18 PM
 
John Mitchell wrote:
"You can also put it in the page settings > page header tags like you mentioned and it will go to the head."
this works fine, so long as you don't have too serious a syntax error in the JavaScript you put there.

I found this out the hard way when I neglected to properly close the <script> tag...once I'd hit Update to save my changes to the database, I was screwed...couldn't save further edits to the page or page settings...couldn't delete the page...nothing...my bad JavaScript broke the client-side function "
__doPostBack" which is involved in all of the above operations!

The only way out of the mess I made for myself was to go into the database and manually clear the "page header tags" field...not fun!

As long as your browser can parse the rest of the page, you can get away with less than perfect JavaScript in there...but be careful and don't develop/test your script this way.
 
New Post
8/9/2006 3:19 AM
 
IonGuy,

I thought I was making the mistake of forgetting the </script> tag in the header, until I did the same thing 3 times in a row.  Seems like the database field must be set to 255 characters, because the javascript kept getting chopped off. 

It might be nice in future versions to have some protection for the missing </script> tag in that header.  Or at least give some clue that the text entered might not fit.
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Adding javascript to a page ..Adding javascript to a page ..


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