Problems with dynamic URLs

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2014 05:23 AM
Hello folks,
I am trying to open a jnlp-file with simple href in javascript from Alfresco Share.
Result on localhost (working):
Result on test environment (not working):
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
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
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2014 06:25 AM
After some research I found the Alfresco.constants
location.href = Alfresco.constants.URL_RESCONTEXT + "components/javawebstart/AEF_JNLP.jnlp";
