Questions tagged [javascript]
JavaScript is a dynamically-typed language commonly used for client-side scripting. Unless a tag for a framework/library is also included, a pure JavaScript answer is expected.
250
questions
0
votes
1
answer
43
views
Breezing Forms reCAPTCHA doesn't display with JCH enabled - how to fix?
A combination of JCH Optimize combining of JS files and moving them to the bottom and Breezing Forms with reCAPTCHA enabled results in invisible captcha, inability to send the form and No reCAPTCHA ...
0
votes
1
answer
20
views
JCH - what do I enter to ignore scripts from an extension?
There's an issue with BreezingForms and JCH resulting in the former not showing a reCAPTCHA because JavaScript is moved to the bottom, as I managed to debug.
I don't want to disable the feature ...
1
vote
1
answer
83
views
How can I unload scripts in Joomla 5
I need to unload /media/vendor/jquery/js/jquery.min.js from
Joomla 5 in my custom template.
Anyone can help me?
0
votes
0
answers
31
views
Parent menu items in dropdown are not clickable
I've got a dropdown menu on my Joomla 4 site, and the parent items in the 2nd level are not clickable for some reason. What would cause that?
Here is the site: https://qph.uim.temporary.site/
If you ...
1
vote
1
answer
33
views
How can I prevent dropdown.min.js from loading on the front end of my website?
dropdown.min.js is conflicting with the way I have my menu set up in my Joomla 4 website, but I can't disable it entirely because the back end of the website needs it. How can I keep it enabled for ...
0
votes
1
answer
200
views
Problem with dropdown menu in Joomla 4 site
I'm having a problem with the dropdown menu in my Joomla 4 site. I think there's some sort of Javascript conflict that's causing it, and I'm hoping someone smarter than me can help pinpoint it.
The ...
1
vote
2
answers
123
views
Best way to save timestamp for new or modified records in custom component
In my custom component I have two database tables for items in my component with the standard 'created' and 'modified' datetime columns to contain timestamps when those items are created or modified.
...
0
votes
1
answer
88
views
Loading a JS file with web asset manager for Bootstrap modal
I'm loading a Bootstrap modal file in HtmlView.php and then a js file to manage it with the following schema:
joomla.asset.json
...
"assets": [
{
"name": "almacen....
2
votes
1
answer
228
views
File Upload from WebApp to Joomla API
I have successfully programmed a Joomla 4/5 API to generate an API web service. There is a kind of weird bug uploading files though, because it basically works on localhost - but on the live system I ...
0
votes
2
answers
194
views
J5. Access editor instances in JavaScript
In JavaScript and J4, to get an editor object from the collection of objects with all editor instances running I use:
let editor = Joomla.editors.instances[myEditorName];
I can see Joomla object in ...
0
votes
1
answer
291
views
Joomla 4 custom template not loading web assets
I am in the process of writing a custom theme for a client and am having issues with the Web Asset Manager. I have been following examples of other templates that are built for Joomla 4+, but I must ...
1
vote
0
answers
42
views
Is there a JS event that gets fired when a subform row got moved / deleted?
When Adding a subform row (in the backend) it fires the "subform-row-add" event that can be observed with JS.
I've tried default namings like "subform-row-moved", "subform-row-...
0
votes
2
answers
428
views
Casseiopa template - Bootstrap Carousel
I am trying to display a carousel in an article using the bootstrap code.
This is a new Joomla 4 install using the casseiopa template. Here is my code:
<div class="d-flex justify-content-...
2
votes
1
answer
249
views
How can I query a custom field value in JavaScript?
I am creating a website for a composer to include a page in a blog style with YouTube videos of concerts. I am attempting to block all the code for the videos from automatically loading on the page (...
3
votes
1
answer
136
views
Can I delay loading a css file until a user is logged in?
I have a CSS file on a Joomla 4 site using a custom template, that has code that only applies to special views for logged-in registered (manager level) users on the front end that styles list displays ...
2
votes
1
answer
986
views
Joomla 4 - Cassiopeia add JS and CSS
I am using Cassiopeia and Joomla 4. I want to add a slideshow.js and user.css file.
I have already added the CSS file and it seems to be picking it up fine. I added the slideshow.js, but doesn't pick ...
0
votes
1
answer
50
views
Store Joomla content into javascript variable
let's say my Joomla is deployed in the Root subfolder ,
*root
**Joomla
soo the index.php for Joomla resides in root/Joomla.
now I want to render Joomla content through Javascript from the root but ...
1
vote
1
answer
122
views
Joomla layout CSS classes in a view into iFrame
In the chat component I developed there is a View inside an Iframe in the Main View. The component's CSS works normally, but I can't use the standard Joomla layout classes. The HTML is sent by the ...
1
vote
2
answers
4k
views
JRequest Method in Joomla 4
JRequest Remove from Joomla 4 then how i must use this method
for example
$controller->execute( JRequest::getCmd('task', $view)
not work
i must change it to what ?
0
votes
2
answers
440
views
How can I sort an unordered list alphabetically by class with JavaScript or PHP?
In a custom J4 site I am using the Shack Locations (previously Focalpoint) core extension that displays a dynamically generated legend of location types on the front end, but it is listing the nine ...
0
votes
1
answer
121
views
How to return data from 2 tables to one table using a select field
My tables:
dzialki
+--------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+-------------+------+---...
0
votes
1
answer
236
views
How can I block a JavaScript script running when a modal is open?
EDIT: I shouldn't have asked this question. See my answer below.
I have my own custom template on Joomla 4.0.6 with a simple scroll-to-top function.
If I open edit an article on the front end, however,...
1
vote
0
answers
71
views
Troubles with Implementation of self written Module for Joomla and Auto Suggest function which should be in Javascript
I am trying to find a way to implement either a self written module in Joomla with PHP code of an dictionary or try to use the dictionary by putting the PHP code in a joomla article with sourcerer ...
2
votes
2
answers
480
views
Integrate external news content API into com_content articles
My client is looking to integrate news content coming from an external API into their Joomla website. The API is in the JSON format and includes multiple fields like title, summary, date, and full ...
1
vote
1
answer
29
views
php exclusion in a joomla plugin of the xml sitemap page created by OSMAP
I have trouble uploading OSMAP sitemaps to google because of a plugin I am using.
That plugin called autoanchor menu creates a menu based on titles in an article. really usefull for long articles.
...
0
votes
2
answers
68
views
JavaScript toggle code works in J4 but not in J3
I have some simple code that hides or shows a div (that will contain an embedded contact form) when a button is clicked.
I first set it up in J4.0.3 and it works fine, but when I tried in J3.10.2 the ...
1
vote
0
answers
1k
views
React.Js with joomla 4
I searched almost all possible joomla forums to integrate a SPA with joomla 4. I have a SPA with react ready and I want to display it on the administrator side as a component. The only problem is the ...
4
votes
1
answer
679
views
Best Practice: Loading component Styles & Scripts in J4
What is the best practice for loading styles and scripts?
Option 1:
HTMLHelper::stylesheet(Uri::base().'media/com_mycomponent/css/mycomponent.css');
Option 2:
$wa = Factory::getApplication()->...
0
votes
0
answers
71
views
Cannot add Amazon Banner Links in Joomla Site
I am brand new to Joomla and it appears that it does not allow JavaScript codes to run by default. I am running my website on the latest version (3.10). I have looked all around the internet, disabled ...
1
vote
2
answers
197
views
How to create joomla plugin with jquery code
What is the best way how to add jquery code by Joomla plugin?
How can I set that these code should be applied just for checkout page of VirtueMart in xml file?
Is this the best way?
<?php
// no ...
1
vote
1
answer
266
views
Use Text-Editor in UIkit Modal (Module Backend)
For a new Project i would like to have an editor instance inside a modal popup (click on an object to add / edit details). I have my Custom Field that loads an editor like so:
$editor = JEditor::...
3
votes
2
answers
220
views
Place article specific scripts in head section
I'm using a lot of javascript files for my articles. These scripts shouldn't be loaded everywhere - only in certain articles. That's the reason why I don't add them inside of the templates´ head. At ...
0
votes
1
answer
65
views
Error in script declaration; Error:Cannot read property '1' of null
I updated plugin JCH Optimize.
When it's enabled I get issue:
Error in script declaration; Error:Cannot read property '1' of null
I tried to exclude this script and css, but it doesn't work.
Link ...
0
votes
2
answers
2k
views
How to Fix PHP Deprecated : Factory::getDocument() is deprecated
How can I fix the following deprecation error generated by my php code?
Factory::getDocument() is deprecated
$app = Factory::getApplication();
$wa = $app->getDocument()->getWebAssetManager();
...
1
vote
1
answer
890
views
How to fix "Reduce unused JavaScript" and "Minify JavaScript"
I have a Joomla website that I wish to make faster by following the indications given by the GoogleSpeed Insight page:
"Reduce unused JavaScript" and
"Minify JavaScript"
google ...
1
vote
2
answers
4k
views
How to add a piece of JavaScript code to the header?
A question from a complete Joomla noob, so bear with me:)
I am trying to add a piece of JavaScript code (the Adsense Auto Ads code) to the header files of a Joomla website, but my approaches seem to ...
0
votes
0
answers
227
views
Installing Node.JS and Socket.IO in Joomla
I'm trying to develop a simple chat for my website, I tried with ajax first but then I was recommended to develop it using Socket.IO instead, I saw their demo and everything looks great, I have my ...
1
vote
1
answer
313
views
Submitting a form in pure JS
How to get the formDate in the controller?
my HTML
<form id="myform" >
<input type="number" name="jform[option][1]">
<input type="number" ...
2
votes
1
answer
379
views
How is Mootools loaded?
A javascript component on my site has stopped working. While debugging I found out it conflicted with Mootools. Only then I realize Mootools is loaded on my page. I remember reading an article saying ...
1
vote
1
answer
272
views
Joomla 4 - Module Backend Subform subform-row-add "row" not available
while updating one of my modules for J4 i recently noticed that the repeatable subform field no longer provides the added "row" in JS. Working JS for J!3.x:
$(document).on('subform-row-add', ...
2
votes
2
answers
583
views
addScriptDeclaration is not working
I am trying to add an inline Javascript in my Joomla 4 plugin using addScriptDeclaration().I edited the code like suggested but the plugin is not working .After enabling it , it is not doing anything ....
1
vote
0
answers
40
views
How can I update a Joomla form editor box contents from Javascript?
I have a form with lots of fields including editor fields that display using jce/codemirror. I have buttons that call the submitbutton.js which builds a string from other elements in the form. I can ...
1
vote
1
answer
316
views
Google map infowindow stops working on Joomla 1.5 version
My component has the functionality to load google map (Maps API version 3 with valid API key).
My infowindow above the marker stops working. One week back everything was smooth and working good.
Here ...
1
vote
1
answer
289
views
How to use Openlayers transpiled Javascript code in my own extension (a "bundle")
I am developing a Joomla 3.x content plugin to display Openlayer maps in articles based on @Robbie Jacksons excellent tutorial at https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_a_Map ...
1
vote
1
answer
84
views
Use com_ajax with a custom field
I've created a custom form field for templates, which is meant to handle SCSS compile. In short, I've opened an issue on Github where I had a little chat with one of the Joomla devs about wasm compile....
0
votes
1
answer
166
views
Does an AJAX request to a PHP script inherit session context
From JavaScript loaded via a static HTML5 file [loaded from a Joomla page element's onClick event and window.open()], does an AJAX request to a PHP script inherit the session context such that ...
1
vote
2
answers
313
views
How to show multidimensional data in my CanvasJS chart?
<?php
$db->setQuery("SELECT MartabehName, COUNT(MartabehCode) FROM `#__dimteacher` GROUP BY MartabehName");
$countMartabehName = $db->loadObjectList();
foreach($countMartabehName ...
2
votes
1
answer
431
views
Ajax post request with pure javascript, no jquery
I'm using fabrik to develop some applications, it's great.
However I have the need to use ajax with it now, I know how to use it and I already have everything set up, but I need to fix the javascript ...
1
vote
1
answer
886
views
TinyMCE editor loaded through AJAX not working
I've built a form that calls for an editor to be loaded through AJAX, but when I insert the fetched contents I get only a <textarea>. If I hit the toggle editor button, then the editor gets ...
2
votes
2
answers
2k
views
How can I add a local custom javascript file into the bottom of the template's index.php file?
I am writing some custom javascript in Joomla 4 Beta 6 to control various aspects of my custom front-end template's menus. It needs to load after the page has been rendered, so I want to add it at the ...