JavaScript is a prototype-based object-oriented scripting language that is dynamic, weakly typed and has first-class functions.

learn more… | top users | synonyms (2)

0
votes
0answers
7 views

TTS for digit 0-9 [on hold]

Could you please help with TTS for digit 0-9. How can i make my own TTS for digit 0-9. i have application where user will insert his mobile number and by using TTS I have repeat same number. By ...
0
votes
1answer
15 views

ReferenceError: jQuery is not defined in custom module [on hold]

I am hiding some form elements in my custom module, but jQuery is not loaded in my node page. jQuery(function($) { $("#edit-field-program-event").hide(); $("#edit-field-program-type").hide(); })...
0
votes
0answers
13 views

Zurb Foundation 6 Drop dowm menu problem

I am creating a theme with Drupal 8, and I am having a problem with the Foundation drop down menu. I included Zurb foundation with Gulp and NPM. I think the problem is with the Foundation JavaScript ...
0
votes
1answer
14 views

How to add at end of js src ?some_text

How to add to <script type="javascript" src="jquery.js"> at end of src to have it with ?some_numbers like <script type="javascript" src="jquery.js?some_numbers"> with some drupal 7 special ...
0
votes
0answers
15 views

How can I set up a specific content type to open as a modal?

My use case is that I have a growing glossary of terms and definitions using a "terms" content type that is linked to by other content types. For example; (Information/FAQ content type) Title: ...
0
votes
1answer
5 views

Image Gallery Has Blurry Images

My image gallery is showing the images blurry. Its using Ligthbox2. When I click on the images, they show clear in the lightbox. Is this a lightbox setting?
0
votes
1answer
25 views

The simplest way of get an emerging modal window

I want to open a modal emerging window, with some HTML on it and a close button. It should open when the user visits the page. What is the simplest way of doing that and what modules should I use? I ...
0
votes
1answer
17 views

JS not work in bootstrap subtheme

I am using bootstrap 3.6 sub-theme/cdn, I've added scripts[] = js/custom.js and I can see it in the source code of the page. But... javascript is not working. I copied some javascript code modules ...
0
votes
0answers
5 views

What is the best solution for tabbed views for use with Panels? (Compatibility issues with Panel Tabs & jQuery)

Nearly completed with site work and downloaded jQuery Update (7.x-2.7) in order to run a Owl carousel. After enabling jQuery Update, my tabbed content (Panel Tabs) stopped displaying properly. On ...
0
votes
0answers
15 views

Show field after a user has clicked on javascript link and track these javascript clicks per entity

The problem is this: I would like to not show the email field directly when a user lands on an account page in my site. There are 2 basic reasons for that: Our marketer guy needs information ...
0
votes
0answers
28 views

Adding jQuery Accordion to Specific Node Template Page

I'm going to ask a question differently than I did on the drupal forums, hopefully generating an answer here. I am in need of using jQuery accordions to display the data of a particular module (...
1
vote
0answers
15 views

RefreshView, can't select html refreshed elements

I have a view page. This page has 3 blocks. Block 1 refresh Block 2. Block 2 refresh Block 3. My code is as follow : (function($) { Drupal.behaviors.mymodule = { attach: function(context, ...
0
votes
1answer
49 views

Using drupal behaviors for a Bootstrap carousel

I created a custom front page using page--front.tpl.php, and I added a Bootstrap carousel on it which works fine, but the javascript I have (carou.js which is in mysubtheme'/js/carou.js') is not ...
0
votes
0answers
9 views

JQuery, Accordion Panels and Geolocation Google Map Not Cooperating

It appears now that I have created some jquery accordion panels into a custom node page, my google map from the geolocation field is not working now. I have seen similar instances to where this is all ...
0
votes
1answer
26 views

Datepicker not appearing when an url alias is added

I've implemented a datepicker in a textfield on a basic page from Drupal. It works fine and the url shown is "http://....../drupal7/node/28". If I add an url alias to the url, the datepicker doesn't ...
1
vote
1answer
42 views

How do I pass JavaScript variables back to PHP?

I'm trying to build a Drupal 8 module with a jQuery plugin. I wanted to pass some of the JavaScript variables to PHP so that I can save the variables into database. This question asked about the way ...
0
votes
0answers
13 views

How to get drupal.js and drupalSettingsLoader.js to load on mobile?

On Drupal 8, there seems to be a lot less js files when opening a site on mobile, than desktop - is that normal? Two of those missing files are drupal.js and drupalSettingsloader.js, which I believe ...
1
vote
0answers
20 views

Can't use Amazing Slider

I'm on an updated Drupal 7 core site with PHP filters enabled. I have tried all possible best to embed Amazing Slider on Drupal using this code without any luck: <?php echo amazingslider1_output();...
1
vote
2answers
26 views

How to attach JSON data to JS variable without it being escaped

I'm having so much trouble with drupal 8 right now. when in Drupal 7 I could do: drupal_add_js("var a = 'b';"); and be done with it, for the life of my, I can't figure out how to attach data to a ...
2
votes
1answer
16 views

Change other image when mouseover in views

I need to change big image "A" when mouseover thumbnail "A" in a view. How can I do this? Preproces page or jquery in a customt text in view?
0
votes
1answer
19 views

use drupal_add_js after external js scripts have already been loaded

I have a simple function to call on a specific page template. I'm calling it using this <?php drupal_add_js(" jQuery('.row).equalize(); ","inline"); ?> and it's using an ...
0
votes
0answers
18 views

Response data return [] by Facebook SDK javascript?

I used Facebook SDK JavaScript version 2.4 and Drupal 7. I created a Facebook account allowed to log in to get the email account data into my database. I created a button for the share dialog. When ...
1
vote
0answers
7 views

how do i integrate an svg script with iframe on a webpage?

Bare with me I'm a n00b.... I'm working on a project and the person that has the drupal knowledge has backed out making me responsible for their part. ISSUE: I'm in the works of creating an ...
0
votes
0answers
29 views

Click event is not triggering

I have created a view contains fields like title, body . I want to add a click event to title. I have used $("body").on('click' ,".title".. . Still it s not working. $("body").click(function.. works ...
0
votes
1answer
30 views

Do I need BOTH jQuery wrappers or just one?

[Drupal 7.43] [Production Linux Environment] [Omega4 Sub-Theme] [jQuery-Update-Module-7.x-3.0-alpha3] (Some Questions) I am using jQuery on my website to accomplish several fixes: Make iPhones ...
1
vote
0answers
11 views

Adding jQuery libraries using #attached library and drupal_add_js

version: drupal7.23 I have a web page include 2+ jQuery version libraries, at the page's search box, I use $form['#attached']['library'][] = array('system' => 'ui.autocomplete') to get ...
-1
votes
0answers
24 views

Fivestar rating render using custom module and custom js

i want to display stars instead of dropdown list(Which i am getting currently) i am using fivestar module and display field is star while viewing, this approach is working in normal tpl files. here i ...
1
vote
0answers
30 views

Which button id triggered the form submission

My module hade a form and the form have 5 buttons: create, edit, save, etc.. also my module form use ajax to send the requests, and the function look like this: $form['dialogCreateButton'] = array( ...
1
vote
1answer
31 views

Bind click event to ajaxify form button

how the title says I would like to trigger javascript (jQuery) event from generated Drupal form button. I already add an id to the button and added the javascript in theme file like so: $form['...
1
vote
0answers
43 views

Update database/dom after dialog button submitted with jQuery

Clicking a dialog button I want to update Drupal database using jQuery .ajax() function! I want to know if in first place is secure to do so or is another method to handle the synchronous requests? ...
0
votes
1answer
21 views

How can I pass a variable to javascript from a preprocess function? [duplicate]

How do I pass $variables['is_front'] from template_preprocess_page() to a jquery script in Drupal8?
0
votes
0answers
16 views

PHP rewrite on field-collection with onclick function

I'm trying to rewrite field-collection [field_video_cue_points] items as a link which hold onclick javascript functions in Views. I use the links to jump to specific times within a video. A link looks ...
0
votes
0answers
13 views

Error Ckeditor js when content editor into vertical tabs?

I used module Ckeditor major 7.16. I had build vertical tabs and create field text_format into fiedset. This see demo - Vertical Tabs --Fieldset + Element form.... --Fieldset + Element ...
3
votes
1answer
66 views

What is the equivalent of Drupal.settings.basePath?

I'm trying to get the site URL in JavaScript. In Drupal 7, this is stored in Drupal.settings.basePath. What's the Drupal 8 equivalent?
1
vote
1answer
52 views

Cannot bind delegate onClick event on .use-ajax elements

I have a view, that is refreshed with ajax. I'm using Jquery 1.7.2 You click a button, that call a javascript function : $(view_identifier).trigger('RefreshView'); Before this refresh, I've ...
0
votes
2answers
27 views

Don't load jQuery in a Drupal 8 site - even when modules have it as a dependancy?

How can I stop jQuery being loaded in Drupal 8, even when modules which use jQuery are on the page? I have an existing styleguide which I'm pulling into a Drupal 8 site. I already have all the ...
0
votes
2answers
36 views

Uncaught TypeErrors have me baffled

This is my first Drupal 8 site but I have been building Drupal sites since Drupal 6. I am getting lots of Uncaught TypeErrors in the JavaScript console that I can't figure out. I have spend hours ...
0
votes
0answers
12 views

Pass value from browser to an array

I have built some javascript modifications to an exposed views filter form. I want to add a value to the exposed_input array, basically, a way of keeping track of what was last clicked. I want the ...
0
votes
0answers
19 views

Webform add a submit user confirmation

i want to add a step between the validation of the form (check if there is errors in the form) and the submition of the form (the moment when the form is saved). I want to show to the user a colorbox ...
1
vote
2answers
42 views

How to load jquery in twig file

I need to run a jQuery file in a twig file in order to bind aqua lift segments. but jQuery is not loaded yet . How can I load jQuery at this point without loading it twice? thanks
3
votes
2answers
53 views

How to run jquery function on every page load

I have a Views grid that contain images in DIV containers. I want these containers to have one of two possible heights 60px or 104px, depending on the images height. So I came up with this function (...
1
vote
0answers
15 views

How do I store data in entities text-list and field-collections?

I have retrieved data from an external database using REST. Now that it is cached in my Drupal 7 site in tables, I need to create new nodes of a specific content type. Works fine for most fields (e.g.,...
0
votes
1answer
19 views

Administration page doesn't show pop-up (overlay) windows

When I try to place new block by clicking "Place block" button or when I click "Configure" on the block I see no pop-up window as I see in tutorial videos, like here: https://www.youtube.com/watch?v=...
0
votes
0answers
15 views

drupal_add_js being called too many times

I have a node page I created that I am using to control a certain node, it is called webform-form-19053.tpl.php. With this webform, a person will add a report using the form, preview the data before ...
0
votes
1answer
71 views

How do I get a module path?

I'm creating a module in Drupal 8 and I need to define a relative path to mymodule to pass it on a JavaScript file like this. $scope.getPlatformIcon = function (_platform) { var modulePath = "/...
0
votes
1answer
26 views

how do I make JavaScript run after the page is loaded

With Drupal 8, I am adding JavaScript to my theme in the libraries.yml so that I can put lift segments into the data layer. But it is running before the body is loaded, and the data layer is being ...
1
vote
1answer
55 views

Please help for the moment no way to include chemistry in Mathjax

I'm using the Mathjax Module on drupal 7. All working pretty good but when i'm trying to add the chemistry js, it was not the same !! I tried to enable it without success. I have read a lot of ...
1
vote
1answer
20 views

Send 'compare product' action to Google Analytics

I am having a products page in my site. In that I have a comparison functionality. Now I want to send data to google analytics so that Admin can later on check which products were compared. I have ...
3
votes
1answer
39 views

Load CSS and JS using absolute paths on select pages

I've got a page (menu callback) which serves as a template for an external service. As the HTML of the page is consumed by the external service and rewritten then served from their server, all the CSS ...
0
votes
2answers
48 views

Command to start nodejs? Server.js and app.js missing

The outdated documentation for drupal integration of nodejs using the nodejs module instructs me to start nodejs with the command node server.js. But neither server.js or app.js (replacement to ...