I have UCCX 11.6(2) and have written a simple script which gathers data about contact centre settings and returns them as a html page when the script is accessed via a https trigger (port 9443).
So far, so good. I now want toi apply some styling to the returned html page and would prefer to do this using an external stylesheet.
This is where I am struggling - where do I upload my stylesheet and how do I reference it within the html template used by the http triggered script to create the html document?
I have tried putting it in the documents repository under default/webapps/ROOT/ but the web page cannot retrieve them from there.
Any help apprecia
Solved! Go to Solution.
If you tell the browser to go fetch a file from the UCCX server, then you will have to have that browser authenticate with UCCX, since the repository is protected behind authentication.
Unless, you indirectly serve the file on port 9443 like this:
The script would simply be a String variable to store the file name in, a Get HTTP Contact Info step to retrieve the file name, and a Send HTTP Response, using doc[filevariable] to send the file back to the browser.
String the_requested_file = ""
Start the_requested_file = Get HTTP Contact Info (--Triggering Contact--, Parameter the_requested_file = file) Send HTTP Response (--Triggering Contact--, DOC[the_requested_file]) End
So the trigger for the http application would be https://youruccx:9443/getfile ?
I will give it a go but I guess it might be easier just to embed the style info in the html template rather than use an external css file.
Whilst I have your attention can I ask a related question? - when I access http triggers using Chrome the browser just loads the html file as a text file. Using IE or Firefox the page loads fine. I was wondering if you had seen this behaviour? - I thought it might be because Chrome could not load the external CSS file but it does the same even if I remove the link to the CSS file.
What is really odd is that if I click the link in the repository for the html template that is transformed by the http triggered script Chrome loads it and displays it as a webpage.
Thanks the Set HTTP Contact Info step resolved the issue.
I really appreciate you taking the time to respond.