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.
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:
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.
In the example above: select the Code menu on the left and the script does not run.
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
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.
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.
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.
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?
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).
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.
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
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.
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.
Copy link to clipboard
Copied
Thank you all.
At this point, I don't think it's possible to add any JavaScript functions to any topic when publishing to SharePoint.
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.
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.
Copy link to clipboard
Copied
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.