Hello everyone,
I performed all the steps from:
https://docs.madcapsoftware.com/flare20 ... torial.pdf
and my buttons still don't work. I get them displayed in the output, but nothing happens when clicked.
Can someone advise on what could be the problem.
Thank you!
Email and Help toolbar buttons don't work
Re: Email and Help toolbar buttons don't work
Hi, welcome to the forums!
I would strongly advise you provide more information, as people are unlikely to be able to help with a vague query.
Can you tell us exactly what you are trying to achieve, the code you are using, and importantly, any errors you see in your browser developer tools when you click the buttons/load the page?
I would strongly advise you provide more information, as people are unlikely to be able to help with a vague query.
Can you tell us exactly what you are trying to achieve, the code you are using, and importantly, any errors you see in your browser developer tools when you click the buttons/load the page?
Re: Email and Help toolbar buttons don't work
Hi,
sure, thanks.
So, the scope is to add a button on the toolbar that, when clicked, opens the support.company.com link.
I performed all the steps described in the pdf, but when the output is generated, the button is visible, but nothing happens when clicked.
After investigating a bit, I found this error:
The Content Security Policy (CSP) prevents cross-site scripting attacks by blocking inline execution of scripts and style sheets.
To solve this, move all inline scripts (e.g. onclick=[JS code]) and styles into external files.
Allowing inline execution comes at the risk of script injection via injection of HTML script elements. If you absolutely must, you can allow inline script and styles by:
adding unsafe-inline as a source to the CSP header
adding the hash or nonce of the inline script to your CSP header.
The thing is that even if I move the button's on-click action to a .js external file, I don't know how to link to it from the toolbar skin settings.
Can someone help?
sure, thanks.
So, the scope is to add a button on the toolbar that, when clicked, opens the support.company.com link.
I performed all the steps described in the pdf, but when the output is generated, the button is visible, but nothing happens when clicked.
After investigating a bit, I found this error:
The Content Security Policy (CSP) prevents cross-site scripting attacks by blocking inline execution of scripts and style sheets.
To solve this, move all inline scripts (e.g. onclick=[JS code]) and styles into external files.
Allowing inline execution comes at the risk of script injection via injection of HTML script elements. If you absolutely must, you can allow inline script and styles by:
adding unsafe-inline as a source to the CSP header
adding the hash or nonce of the inline script to your CSP header.
The thing is that even if I move the button's on-click action to a .js external file, I don't know how to link to it from the toolbar skin settings.
Can someone help?
Re: Email and Help toolbar buttons don't work
Try using a jQuery function in the toolbar javascript section:
You'll need to change google.com to your support link and the help-button class to a unique identifier for the button, which you can find by inspecting it in the output.
Code: Select all
$(document).ready(function() {
$(".help-button").on("click", function() {
window.open("https://www.google.com", "_blank");
});
});
Re: Email and Help toolbar buttons don't work
Sorry for such a late reply.
I tried the recommended script, and it worked like a charm.
Thank you very, very much!
I tried the recommended script, and it worked like a charm.
Thank you very, very much!