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...Telerik removing Javascript codeTelerik removing Javascript code
Previous
 
Next
New Post
2/16/2011 11:38 AM
 
Dave

Yes I just throw the script in at the bottom - from memory it doesnt matter.

I will take a look at this later tomorrow - I wanted to add a timer onto a page of mine so I wud like to give it a go.

Let me know if it is sorted so I dont waste my time

Cheers

km
 
New Post
2/16/2011 12:20 PM
 
Miles,

Awesome, I would love to see this done.  I think it would teach the community how to implement javascript code of all kinds.  Once you show me, I would like to start a new thread that treats this generically, highlighting your solution since this bit of javascript is just one example of what DNN community might want to implement.  If you show me, I will take care of the re-post start and you can just copy and paste your answer in the new thread (different title) without any more work.

One question that comes to mind, is there a way to drop the javascript in the module header like Sebastian suggested and call on it (like you're going to show us) from the header rather than sticking it in the skin file?  It seems like if it's a one time (page) use and over time there are more of these types of javascript implementation scenarios then the skin.css would get fat?  Just speculating, I will punt to your expertise.

Thanks so much for the help.

Dave
 
New Post
2/17/2011 8:44 AM
 
No worries Dave I have just read the script and am reasonably confident that can get to work at skin & module level. Agree it would be very beneficial for the community to show how done. Just thinking aloud yes all sorts of benefits putting in module v skin level, generally I dont think it matters overly as jscript works at client level anyway, but in principle you want to minimise runs as much as possible. At the moment there are some scripts over running in popular sites like Hotmail that are driving me mad! :) Anyway I will seriously try to do tonight, but if dont get chance, bare with me as am suffering serious sleep depravation - website related. :( But wud love to help to help you, as many help me.
 
New Post
2/17/2011 11:37 AM
 
Dave

Where did you get the script and are you confident it wriiten correctly for your purpose? i.e. have you seen it run b4.

I have just put the script you provided into a skin and uploaded it - I could see the page running for extensive time which suggessts that it was at least parsing to try and compile or whatever, but it was a pretty disappointing on screen result.

To help me could you explain:

1. Eactly what does the timer do and how does it appear on the screen. Obviously I can read the script and understand the intent, but I want to judge in relation to exactly what it does and what you want it to do.

2. How time (pun) pressed are you for this? A relatively easy  option is to create a web-page and ask people to comment on what is wrong with code - if at all - then ask if alternative suggestions - it might be that simply the scripting tags are wrong at start/end of code. I have had that issue b4 where I was told to do something, but end tagging very temperamental in DNN & I had to adjust by trial and error until successfully worked.

3. Advantage of last method is it can become a great learning resource for others - I am happy to do as it will take me minutes. Then you can use what we learn for your generic teaching. It too cud become an active workspace to demonstrate and discuss issues/problems with others so in itself becomes a learning centre - anyway just a thought.

Rgds

Miles 

 
New Post
2/17/2011 12:32 PM
 
Miles,

Thanks always to help continue to educate the community.

The timer example and code are on this page.  http://www.hashemian.com/tools/javasc...

We have used it to count down our annual race on this site http://www.hannibalcannibal.com

We don't normally do much with this site until months before the race each year, now.  The code was working I put in place and tuned for the new date last year.  We keep our websites up to date and last year at this time many of us were using the FCK editor.  I simply would paste (using the old editor) javascript code like this into a page and it would run.  This year I go to reskin the site and add some new content to support our race and when I pasted the javascript code into the Telerik editor it would strip it.

I noticed it doing this to any code of this sort when I started using the new editor with a google analytic code.  The same thing happens, I paste it in there like I have always done and the Telerik editor removes the code.  At first I thought if I could cure Telerik from stipping this code, it would work like it used too.

So, I started this thread asking why the Telerik editor is stripping code from a page to find a solution to add the same counter that was working (2 years running) into our reskinned site.  From the sounds of things we now have to embed javascript into the CSS file or the header and call on it with the code we produce manually with the HTML editor.  This is more advanced than how it used to work obviously from just pasting the javascript in the editor and saving it.

We are not that pressed for a solution here because I am going to have to buy a module for a counter.  I has dawned on me (if I am reading situation correctly) that minor javascript implementation with a DNN page is changing to be much more manual than it used to be.  So, at this point since you have been so gracious enough to converse on the subject and offer solutions, I would like to see if we couldn't use this timer code as a generic example on the new method of implementing such code?

I can all but gaurantee that even though I skirted this counter need with a module that something else will crop up whereby I will need to implement some small amount of javascript.  I am guessing I am not the only one since my needs are probably similar to the rest of the community.

If you want me to start a new thread named something along the lines of, "Proper implementation of javascript within a DNN page", I will do it.  Am I wrong, has things changed in DNN so you just can't copy and paste the code?  Is there something else I am doing wrong?

Thanks again,

Dave
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Telerik removing Javascript codeTelerik removing Javascript code


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