How to get proper path for libraries for javascript to be loaded ?

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
smalldragoon
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Tue Aug 02, 2011 10:26 am

How to get proper path for libraries for javascript to be loaded ?

Post by smalldragoon » Wed Feb 19, 2020 7:11 pm

Hi, following my other post, I have issue now with the path of my javascript librairies ..
To re-share some context : I have a module which embed an html and javascript.
When I load the page :
http://mysite/modules/mod_mytest/app.php , I got an error as the js librairies are not loaded correctly
I have in my code :

<head>
....
<link rel="stylesheet" type="text/css" href="app.css">
</head>

but with browser debugger, I see the URL being :

http://mysite/index.php/pages/app.css

any insights ?
Thanks

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17445
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: How to get proper path for libraries for javascript to be loaded ?

Post by toivo » Sat Feb 22, 2020 4:00 am

The structure of the URL looks odd because you are trying to load a module, which may be the reason for the issue you are trying to solve. It would be better to follow the normal architecture and develop a component instead.
Toivo Talikka, Global Moderator


Locked

Return to “Extensions for Joomla! 3.x”