• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

JavaScript files only load upon refresh in SharePoint

New Here ,
Jan 06, 2023 Jan 06, 2023

Copy link to clipboard

Copied

Good Day All:

I have an unresolved issue with JavaScript and Sharepoint ASPX files. This doesn't seem to be a problem with HTML files, only with ASPX files. There are two topics that have custom JavaScript files.

  • Script A supports a horizontal tab menu on one topic.
  • Script B supports a vertical tab menu on another topic.

The problem appears with both topics. When a topic loads in SharePoint, the script does not run. The script will run after a page refresh. However, the refresh doesn't "stick" when moving to another topic.  For example:

  1. Select the first topic, the script doesnt run.
  2. Refresh the page, the script runs.
  3. Select the second topic, the script doesnt run.
  4. Refrush the page, the script runs.
  5. Return to the first topic, the script doesnt run.

 

RoboHelp 2020.5.71 is the authoring tool. The JavaScript code was moved to multiple locations (external file, within the header, within the body) to determine if that was the issue, but the results are the same.  As you can see by the screen shot, I added a refresh button to the topic so the users can select it to activate the script, but this is just a band-aid. 

 

select-code-no-response.png

In the example above: select the Code menu on the left and the script does not run.

 

select-code-response-after-refresh.png

In the example above, refresh the page, then select the Code menu, and the script runs.

 

I've worked with our SharePoint team and they are unable to identify the issue on their end. We've tried to resolve this issue since September but cannot find a resolution.

 

Looking forward to any assitance,

 

Ken

 

 

 

 

Views

547

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

Community Expert , Jan 16, 2023 Jan 16, 2023

Ok, another couple of things to try - test with creating some responsive HTML5 and sticking that on a non-Sharepoint webserver to see if it behaves; and checking with your SP admin to see if there's anything that prevents JS from running under the circumstances you describe.

Votes

Translate

Translate
Community Expert ,
Jan 06, 2023 Jan 06, 2023

Copy link to clipboard

Copied

I'd be tempted to try two approaches - the first would be to get patched up to Patch 8 and test it out again. The second would be to download a copy of RH2022 and test it out with it - any solutions to a possible bug would only be done in RH2022 anyways.

Votes

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
New Here ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

Thanks for reaching out Jeff. I finally downloaded the latest version (2022). The results are the same. In fact, I created another project that includes JavaScript on a topic. The same issue occurs. In short, any topic that contains custom JavasSript will only run in SharePoint after the page is refreshed. And, you must refresh the page every time you leave the page and return to it. 

Votes

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 Expert ,
Jan 08, 2023 Jan 08, 2023

Copy link to clipboard

Copied

Did this used to work and has since stopped? If it did work in the past, can you identify when it stopped, e.g. on upgrade from classic or RH2020.4, Sharepoint upgrade?

Votes

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
New Here ,
Jan 09, 2023 Jan 09, 2023

Copy link to clipboard

Copied

Good Day Amebr,

Good question. It has never worked. I've only used the 2020 version of RoboHelp, so there has never been an upgrade (just a couple of patches). 

Votes

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 Expert ,
Jan 09, 2023 Jan 09, 2023

Copy link to clipboard

Copied

It does sound like a Sharepoint issue so I'm not sure Adobe Support will be able to help. However, they might know something so it's worth a try.

 

See https://helpx.adobe.com/contact/enterprise-support.other.html#robohelp for your Adobe Support options. The email link tcssup@adobe.com is recommended as it reaches a team dedicated to Technical Communication Suite products including RoboHelp. 

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

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
New Here ,
Jan 09, 2023 Jan 09, 2023

Copy link to clipboard

Copied

Good Day Peter,

Thanks for the feedback. I am curious if the issue is similar to this this post?

Run javascript when topic loads - Adobe Support Community - 12761015

What are your thoughts?

 

Looking forward,


Ken

 

 

Votes

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 Expert ,
Jan 10, 2023 Jan 10, 2023

Copy link to clipboard

Copied

It could be but that doesn't mean I can help you. As in that post, I think you will have to try Support.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

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 Expert ,
Jan 09, 2023 Jan 09, 2023

Copy link to clipboard

Copied

It's possible the issue you linked is related, but that post doesn't mention Sharepoint which is a bit different from a normal web server so it could also be something Sharepoint specific.

 

In either case I think emailing support as Peter suggested is your best bet.

Votes

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
New Here ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

Thank you all.

  • I emailed Adobe support last week, but haven't received a response.
  • I reached out to the person who had a similar issue a year ago, and he stated the issue still has not been resolved.
  • I worked on a new project recently. I created a new project and added a different JavaScript function to a topic. The results were similar. 

 

At this point, I don't think it's possible to add any JavaScript functions to any topic when publishing to SharePoint. 

Votes

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 Expert ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

Ok, another couple of things to try - test with creating some responsive HTML5 and sticking that on a non-Sharepoint webserver to see if it behaves; and checking with your SP admin to see if there's anything that prevents JS from running under the circumstances you describe.

Votes

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
New Here ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

Switching to an HTML 5 skin seems to do the trick. I used the Charcoal Grey skin and rebranded the colors  It's definitely not as nice as the Studio frameless skin, but it seems to work in SharePoint. 

 

I am going to test a bunch of the framless and html 5 skins to determine which ones work. 

 

Thanks for this suggesetion. 

Votes

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 Expert ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

LATEST

It would be worth logging a bug report, I think. It seems like most development is being done in the Frameless skins, rather than Responsive, and they do offer more customisation options. You can request features and report issues here: https://tracker.adobe.com/

Post the item number in the discussion so people can easily vote if they want the same functionality.

Votes

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