Hi there
I have some jquery which I need to add to a template. The jquery uses # and is supposed to place them at the end of the URL when a particular button is pressed. The script works without cmsms.
When I import into a template in cmsms, there is a problem as there appears to be a conflict with the {metadata} tag, or namely, the base href tag. When this tag is in place, instead of the # being added to the end of the existing URL, the user is redirected to the home page. Without the {metadata} tag, the script works, however JavaScript and image files are not displayed.
I have also tried {metadata showbase="false"} and this doesn't work either, same thing with images etc not displaying correctly.
Thank you in advance
Metadata # JavaScript conflict?
Re: Metadata # JavaScript conflict?
Most times when JS doesn't work it isn't getting pulled into the <head> as in the path may not be correct, I use Firefox with the HTML validator which lets me right click a page to view source where I can click on links to CSS or JS and it will show them if the path is correct...
A link to the site would help...
A link to the site would help...
Re: Metadata # JavaScript conflict?
Hi there,
Thanks for your reply. However, I have checked all the paths and they are all correct. It really is a case of the base href in the header - when it is there, my js doesn't work, when it isn't there, it works. But I can't not include it as it then messes up paths to other images and js files.
The issue is not dissimilar to the anchor link issue, whereby the # was redirecting to the home page instead of the anchor on the page. This, in the past has been solved with the showbase=false on the metadata tag, but in more recent versions of cmsms this screws up other paths for images and js files.
Interestingly, this does not appear to be an issue on earlier versions of cmsms, such as 1.9.4 but is an issue in 1.10.
Thanks for your reply. However, I have checked all the paths and they are all correct. It really is a case of the base href in the header - when it is there, my js doesn't work, when it isn't there, it works. But I can't not include it as it then messes up paths to other images and js files.
The issue is not dissimilar to the anchor link issue, whereby the # was redirecting to the home page instead of the anchor on the page. This, in the past has been solved with the showbase=false on the metadata tag, but in more recent versions of cmsms this screws up other paths for images and js files.
Interestingly, this does not appear to be an issue on earlier versions of cmsms, such as 1.9.4 but is an issue in 1.10.
Re: Metadata # JavaScript conflict?
Actually, forget what I have said above, the paths break on earlier versions too!
Unfortunately I don't have a link as I'm working locally.
Unfortunately I don't have a link as I'm working locally.