Is it safe to delete old Javascript code?

Community Beginner ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

Hi all,

 

I'm using RH 2020.7.46 working with an inherited project, which has been upgraded several times from older versions of RH over the years. I've noticed there are some pages which have an old script at the end of the code before the </body> tag

  <script type="text/javascript" language="JavaScript1.2">
    //<![CDATA[
    if (typeof(InitEffects) != 'function') InitEffects = new Function();
    InitEffects('h21');
    InitEffects('h22');
    InitEffects('h23');
    InitEffects('h24');
    InitEffects('h25');
    InitEffects('h26');
    InitEffects('h27');
    //]]>
  </script>

 I'm not entirely sure what this code does, or why it's only on some of the pages. I'm cleaning up some of the HTML which has inherited lots of extra code along the way, including text formatting and external links rather than project links, just because of the way the data has been handled in the past. 

 

Can anyone tell me what this script is for, and if I can remove it?

 

Thanks,

Mikey 🙂 

Views

35

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Jun 07, 2022 Jun 07, 2022
I think in Classic it was to do with DHTML effects (mouse rollovers etc). I haven't used any of those in about 20 years, so haven't investigated if it's possible to use them in New UI. I think it's probably okay to remove, but as always, make sure you have a backup and test thoroughly.

Likes

Translate

Translate
Adobe Community Professional ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

I think in Classic it was to do with DHTML effects (mouse rollovers etc). I haven't used any of those in about 20 years, so haven't investigated if it's possible to use them in New UI. I think it's probably okay to remove, but as always, make sure you have a backup and test thoroughly.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 15, 2022 Jun 15, 2022

Copy link to clipboard

Copied

LATEST

Thank you. I removed them from a couple of pages and tested the output was functioning correctly. So far so good. I tend to make a full backup at least once a week anyway, and more if I'm making any major changes, so have made a backup here just in case. I've removed them from all the pages where they were appearing and so far all seems ok! 🙂 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp