DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Adding Java Script to pages

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





New Around Here





    I want to install Gist.com JS code for live chat & more.
    They indicate:
    'Copy and paste this tracking code just before the tag on every page you want the Messenger to appear for website visitors. '
    Search for 'add Java Script before the   tag' 
    Where do I insert this in DNN CE Ver v. 09.03.02 (24)??
    Lee






    Veteran Member





      Hi Lee,

      You can paste the script in:
      - Settings
      - Site settings
      - Site behaviour
      - HTML Page Header Tags
      Tjep's digital agencyRegards,
      Tycho de Waard

      Tjep's digital agency
      We just love DNN
      https://www.tjeps.com





      New Around Here





        Thanks that worked

        Lee






        Veteran Member





          Lee,

          have a look at Will Strohl's Content Injection Module for DNN. I think this is a much more elegant way to inject JavaScript, HTML, CSS and whatever else. Also duplicating the module on another page when needed is easy.

          Happy DNNing!
          Michael

           

          Michael Tobisch
          DNN★MVP

          dnnWerk Austria
          DNN Connect





          Growing Member





            Hi, I am having problems adding the v 2.0.2 to my DNN 9.8.0 site. I see reference to a version 3 in the extensions list as a later version but do not see this in GitHub.

            Should this work in this version on DNN?

            I am getting no dialogue to position the module on the page and in the page settings, no pencil to change settings in the module.

            Thanks

            Simon Thompson / UK





            Veteran Member





              Michael Tobisch
              DNN★MVP

              dnnWerk Austria
              DNN Connect





              Growing Member





                I located version 3, but not where I expected.

                I am actually experiecing problems inserting any sort of coe snippets into my site.

                I have just attempted to insert some PayPal button code. The editor just refuses to take any action until I remove it.

                With the code injection module, I can add a stadnard HTML piece of code but not the <script> that I need to add.</p>

                Any thoughts?

                Simon Thompson UK






                Veteran Member





                  Posted By Simon Thompson on 02 Dec 2020 08:31 AM

                  I located version 3, but not where I expected.

                  I am actually experiecing problems inserting any sort of coe snippets into my site.

                  I have just attempted to insert some PayPal button code. The editor just refuses to take any action until I remove it.

                  With the code injection module, I can add a standard HTML piece of code but not the <script> that I need to add.</p>

                  Any thoughts?

                  Simon Thompson UK



                  By default there are security checks that prevent injection of scripts in some places in DNN.
                  One example is the CKEditor used also in the  HTML module.
                  It's much safer to use a specialized module to inject this kind of content and not change the security settings of the CkEditor.

                  BTW you can also do this using the Open Content Module if you want.






                  Growing Member





                    I can understand such checks.

                    I am having problems inserting <script> tags even with&nbsp;Will Strohl&#39;s module. If I change the spelling to <sxirpt> it works but not with normal spelling.</p>

                    As mentioned I am also trying to add a PayPal button but even that is disallowed.

                    To me it seemd like some CKEditor restriction but have gone through the options and found nothing helpful.

                    I thought It might have been Cloudflare - at one stage it was blocking my attempts to add this code, so I switched it off for now.

                    Regards

                    Simon Thompson UK

                     

                    You are not authorized to post a reply.
                    Page 1 of 212 > >>

                    These Forums are dedicated to the discussion of DNN Platform.

                    For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                    1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                    2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                    3. 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.
                    4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                    5. No Flaming or Trolling.
                    6. No Profanity, Racism, or Prejudice.
                    7. Site Moderators have the final word on approving / removing a thread or post or comment.
                    8. English language posting only, please.

                    Would you like to help us?

                    Awesome! Simply post in the forums using the link below and we'll get you started.

                    Get Involved