Questions tagged [javascript]
JavaScript (JS) is a client side script language which allows to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed. By default Magento 1 comes with the prototype.js library and Magento 2 comes with jQuery. Use 'prototype-js' and 'jquery' tags for questions about those libraries.
2,374 questions
0 votes
0 answers
28 views
Magento 2.4.8 Uncaught Error: cannot call methods on collapsible prior to initialization; attempted to call method 'forceDeactivate'
I am facing following error on live site magento 2 Today I found that issue with Amasty request quote extension Magento 2.4.8 Uncaught Error: cannot call methods on collapsible prior to initialization;...
0 votes
1 answer
117 views
How to disable options in a Magento 2 custom select field without using setTimeout?
I have a custom select field in my Magento 2 form and I'm loading options dynamically. The goal is to disable specific options based on a condition (option.is_disabled). The current implementation ...
0 votes
0 answers
79 views
Magento stuck on debugger while using dev-tools
Magento website getting stuck because of automatically debugger is triggering in dev-tools. I tried using different browsers still it's happening. Using Magento V2.4.5 (function anonymous( ) { ...
0 votes
0 answers
33 views
How to move field on onestepcheckout to another fieldset that is not there by default?
There is a onestepcheckout that is being processed by two modules. One has most of the wrappers and templates, and another one is responsible for shipping (specific courier company for a country). ...
0 votes
2 answers
350 views
Magento secureRenderer not producing nonce
With this test code <?= /* noEscape */ $secureRenderer->renderTag('script', ['id' => 'testjs'], 'var thisisatest=0;', false ); ?> I'd expect Magento to output a script tag similar to &...
0 votes
0 answers
80 views
Magento 2: Pass custom product attribute to a custom javascript file
I am currently struggling with accessing a custom product attribute (zshortname), which is defined in magento admin panel, in my custom javascript file and send it to google tag manager over dataLayer....
0 votes
1 answer
140 views
How to upgrade jQuery version from 1.12.4 to 3.7.1 in Magento 2.4?
We are using Magento 2.4.2-p2, and the current jQuery version is 1.12.4. We want to upgrade it to version 3.7.1. Here’s what I’ve tried so far: Options 1 - Added the following in default_head_blocks....
0 votes
1 answer
85 views
How to resolve issue in admin configuration right side tabs not able to open
How to resolve the issue in Magento 2.4.7-p3 version admin grid is not able to open. While you are in developer mode and go to store -> configuration-> and open any left tab and now open child ...