cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with dynamic URLs

michaelp
Confirmed Champ
Confirmed Champ
Hello folks,

I am trying to open a jnlp-file with simple href in javascript from Alfresco Share.

location.href = "../res/components/javawebstart/AEF_JNLP.jnlp";


Result on localhost (working):

http://localhost:8081/share/res/components/javawebstart/AEF_JNLP.jnlp


Result on test environment (not working):

http://t1aetest:9080/share/page/context/res/components/javawebstart/AEF_JNLP.jnlp


From where does "page/context/" come from?
Can anyone help me to achive a dynamic url and not to hard code it?

Best thanks, MP
1 REPLY 1

michaelp
Confirmed Champ
Confirmed Champ
After some research I found the Alfresco.constants

location.href = Alfresco.constants.URL_RESCONTEXT + "components/javawebstart/AEF_JNLP.jnlp";