Hello everyone,
I have a small javascript placed inside a HTML macro on my confluence page.
The output of the javascript (a timer) looks fine.
However when a user clicks edit they are taken to an almost blank page (no confluence header or menu etc) containing just the output of the javascript.
The URL is along the lines of https://mycompany.com/viewpage.action?pageId=12345678
If I edit the viewpage.action back to editpage.action I see a normal edit view and can proceed.
Any advice as to how this can be avoided? (Couldn't find any threads on similar issues when I searched).
Cheers, Adrian
Community moderators have prevented the ability to post new answers.
Dear Adrian,
did you check the browser's console output whether it indicates any error? As far as I know scripts in a HTML macro are executed again when you hit the Edit button before the editor is shown. In case something goes wrong here the editor might never show.
Greetings, Andreas
Hi Andreas,
Thanks for your interest and suggestions.
As far as I can figure out the strange behaviour is caused by setting the javascript source to a js file uploaded as a confluence attachment. If I move the js file to an external URL the edit page opens normally. Either way it looks the same to a user until they click on EDIT.
Cheers, Adrian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.