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

learn more… | top users | synonyms

1
vote
2answers
19 views

Update Two select box when change another select box

I have drupal form with three select box i want to change select box 2nd and 3rd after change value of 1st select box. ex: i have Three select box 1) Cruise line 2) Destination 3) Ship Id When ...
0
votes
0answers
14 views

Show content of custom password field on mouseover

I need to hide a custom password field content and display it when a user needs to see and copy it. Using Password Field module is one way to go. But then Password Toggle module doesn't seem to ...
-1
votes
1answer
25 views

on-page javascript not interpreting query string

I've got a question today about on page javascript that writes then is supposed to read a query string. I'm working with a third party tv station finder that has provided me with a snippet to drop ...
0
votes
1answer
28 views

How to make sure my behavior is triggered before AJAX?

I have a form elements that looks like this: $form['properties'][$property->idProperty] = array( '#title' => $property->Label, '#ajax' => array( 'callback' => ...
2
votes
1answer
74 views

Internal/External JS don't work with Drupal, but works fine in static HTML/JSFiddle

Continued from here Applied JS to Drupal theme doesn't work correctly, but it works fine outside Drupal Working JSFiddle: http://jsfiddle.net/tbq8eo8b/10/ (it calculates total, in Drupal it ...
0
votes
1answer
27 views

Applied JS to Drupal theme doesn't work correctly, but it works fine outside Drupal

Applied this JS http://jsfiddle.net/tbq8eo8b/10/ to webforms. As you can see in fiddle, it calculates total amount. When in Drupal, it gives 0 no matter what amounts you select, it always prints 0. ...
1
vote
1answer
45 views

How to pass node ID argument to Drupal 7 div auto update ajax script

EDIT: There seems to be a ready-to-use http://drupal.org/project/block_refresh module available as @albertski indicated, so no need to struggle to develop a new module. I've implemented the code on ...
0
votes
0answers
23 views

JS: Handling click event on element created by another module's JS

I've got two modules, one of which handles a button which makes all menus retract from sight, and another which handles a cycling background gallery. I'd like to switch from a "blurred" to a regular ...
0
votes
1answer
11 views

How do I find out what added code to the $closure of my theme?

I have code in the $closure variable of my theme and I don't know what added it to the theme.
0
votes
1answer
26 views

Why Cant add a class to an element by jquery

In the page.tpl.php I have some elements like <div class="play"></div> I have linked js file to the page and it is correctly works since all functions operate based on click ...
-1
votes
0answers
10 views

Drupal 7 and Adobe Edge Animate

I have an ecommerce store im in the process of building using drupal commerce. One product type needs to be customizable. It will be a shirt that can be customized with what i think is the best ...
0
votes
0answers
18 views

fivestar module js breaking my custom js

My problem is when I use five star module on any page my js gets break on that particular page. I don't know what I am doing wrong
3
votes
1answer
74 views

Using Grunt.js with Drupal [closed]

I'm in need of an organization system for my JavaScript code Drupal. Currently, I've got it inside a folder in my theme's directory: "sites/all/themes/mytheme/js". I've looked at using Grunt.js, and ...
0
votes
2answers
54 views

Want to show/hide multiple divs based on dropdown box selection

I've tried looking around and there are similar problems, but mine is way more simple, but yet, I can't find a solution within these forums. This is the dropdown markup. <select id ...
1
vote
2answers
26 views

Javascript works inline in webform but not as standalone

I have a javascript that works if I place it in a mark up in my webform but breaks the form if I make the form a multipage. If I place the script as it's own file and then call it using ...
0
votes
2answers
57 views

javascript does not work after form load through ajax [on hold]

I am using field collection module for showing some fields with add more option using ajax built in functionality of field collections. in my field collection I have added some javascript on some of ...
2
votes
2answers
67 views

Drupal 7 website layout/styling breaks all a sudden (random), how to debug? there are no logs

One of my websites running Drupal 7 goes out of format, most often when user login. This is how it should be After running out of format this how it looks This may be a CSS issue, it may be a ...
-2
votes
1answer
36 views

How can I pass an array of variables from php to javascript?

I use this but cannot find solution. drupal_add_js( array('YOURMODULE' => array( 'testvar' => $testvar )), array('type' => 'setting') );
0
votes
1answer
17 views

Load .js only if block is loaded

Yes, something like that. If block and it's content are loaded in the page (so I guess detect by ID or something) it would load the .js, but if block is not loaded, it wouldn't load the .js. I need ...
0
votes
0answers
19 views

How to get the value of a content type field in Drupal and pass it to a JS file

In my Drupal theme I have a field for soundCloud URL which its machine name is (field_soundcloud_url_) I have a javascript file that will work based of the value of this variable. But it does not ...
0
votes
0answers
40 views

Inline javascript in drupal_add_js is causing WSOD

In my template.php i am executing some inline javascript code. When executing, the result is a white screen of death (WSOD). The web servers error log says: PHP Parse error: syntax error, ...
0
votes
0answers
14 views

turn js not working in colorbox but works fine on nodes pages

I have manually integrated turn.js script in my drupal 7 website which works perfectly and converting the images in a flipping book. I did that by creating a content type added a multi value image ...
1
vote
1answer
17 views

Script Not Working [closed]

I am trying to integrate 3rd party jquery plugin Turnjs 3rd edition available on github in my website. For this I have uploaded turnjs script on my server and called it in website through my ...
0
votes
2answers
50 views

drupal_add_js settings and working around the anonymous page cache

What I'm trying to do is allow registered users to configure a few colors on public facing pages (profiles, etc.) and to do so I'm using the ColorField module and a few theme functions. My problem is ...
1
vote
2answers
23 views

Uncaught TypeError: Only on Drupal edit pages

I'm using the BigSlide.js sliding menu on my drupal site, which i've built into the theme, and it works fine on every page, apart from on /edit/ pages. E.g. user/%/edit. When clicking the target menu ...
0
votes
0answers
20 views

Change text size on a page with callback

I must add buttons on my site to change font size by the user, an accessibility option. Additionally, after user changes the font size, my custom javascript function must be called as a callback after ...
0
votes
1answer
59 views

How to prevent newline character in textarea

I'm building a form in a module for Drupal 7 and I want to add a textarea as I would like it to be multiline so that text overflows on the next line, etc. but I don't want users to be able to create a ...
1
vote
1answer
164 views

How to attach Dropzone.js uploads to a form element

I'm integrating dropzone.js into my form, but I have an issue regarding my file uploads. I have my dropzone set up, and file uploads are in the $_FILES array. I want to call file_save_upload to ...
0
votes
0answers
13 views

Loading resources(CSS, JS, layout images) for multi-site from same path

I am working on a website with more that 500 subdomains. All the subdomain have same code and different databases. The problem I am facing right now is that whenever I add any CSS change, I have to ...
0
votes
1answer
28 views

My website suddenly started giving Error 200 on anything AJAX related!

The other day my website suddenly started acting weird. When using the Flag module to flag content, i get a 200 error! The content does get flagged once i refresh the page, but when clicking the flag ...
0
votes
0answers
24 views

hook_js_alter not being called

I find this strange. My module seems to be named correctly but the module will not be called. The var_dumps are not on the page nor are watchdogs when I put them in. The module shorthand is ...
0
votes
1answer
20 views

javasript invoking custom module to update user response

I have created Multiple choice questions in drupal . One node (page ) has one mcq . The answers are displayed by simple radio buttons and javascript . Now I am planing to give some dynamic behavior ...
0
votes
1answer
15 views

Embedding Javascript in Content or Block Causes Misalignment of Regions / Overflow

When embedding Javascript, the content area seems to "overflow" past its container. I am pasting an example of how embedding Tweets can cause this problem. The content shouldn't be extending into the ...
0
votes
2answers
35 views

How to integrate JS / CSS only on specified Pages / custom content types

I would like embed my module JS / CSS files only in specified cases. Like on a /url/ or if a custom content type is rendered?
0
votes
1answer
26 views

How can I extend a module and it's library with custom functionality?

My client requested a modification to their slider that will enable two captions. I'm using the Views Nivo Slider module and believe I can accomplish what I want by modifying the module"s code and ...
0
votes
2answers
40 views

Views fields configuration is not working

I set a few fields as FIELDS section of a view. the problem is when I click on the fields the Style settings ,No results behavior , Rewrite results and More links are not collapsible . this is the ...
0
votes
0answers
19 views

add javascript event to view

I have no well enough experience in themeing with view, It is also the first project I used view. In this page, I would like to add javascript event to qq under category_page. When clicks qq I want ...
0
votes
1answer
22 views

Saving a value from Javascript on Drupal form submit

I have a jQuery map that I've built that allows users to select states and counties. This is all done in Javascript. I would like to, on form submit, take this data and submit it to the user's ...
0
votes
2answers
33 views

Trying to send a <div> with webform

I have a Webform that does some calculations (javascript) based on user selections, which i would like to send along with the user-selectable fields to a user's email. Is it possible to append these ...
0
votes
1answer
27 views

Performance and javascript issue in a drupal 7 website

I have a drupal 7 website. Currently its performance is not good and takes much time to render the web pages. For performance, I checked out in YSlow and came up with some results like move all js ...
0
votes
1answer
28 views

Passing PHP variables to JS file initiated from theme .info file

I know it's perfectly possible to pass PHP variables to JS but what if the JS file is initiated from the theme.info file? Can you access it in template.php or? Please some advice.. Thanks!
0
votes
1answer
39 views

Ajax callback called on textfield typing

I'm trying to reach exactly the same state as autocomplete field does. When user is typing in textfield I'd like ajax to wait with its callback so the user can write all the text. I'm trying to ...
0
votes
1answer
33 views

How can I load content on the same page from a search

So the idea is to load the results of the search on the same page. I was told to look into SOLR, but it looks like we have something similar to SOLR , and we just need to know how to load new page ...
0
votes
0answers
54 views

CKEditor placeholder text doesn't work (config.js)

I'm trying to add placeholder text to my ckeditor screen like for example Type here ... . You can do this with the configuration helper plugin. I've placed the ckeditor library in sites/all/libries. ...
0
votes
1answer
20 views

JQuery Mobile.js for drupal 7

I'm attempting to add the functionality of jQuery's Mobile.js to allow for the vclick event. I already have a website in place. What would be the easiest way to add this functionality for an admin ...
0
votes
0answers
74 views

How to display informations from a view with Gmap in an other block, on marker click?

I'm using Drupal 7.3 & Gmap 7.x-2.9 I've created a view (a page, with a path) that displays markers on a Gmap (Using Exended Gmap Format). I would like to be able to use this markers to do ...
0
votes
1answer
33 views

How to execute jQuery on body elements?

I'm screwing around with jQuery for the first time, and I'm unsure of where to add a call in Drupal to allow it to alter classes of elements within the body tag. I'm looking at utilizing something ...
1
vote
1answer
73 views

Apply CSS and Javascript affect to images [closed]

Updated I am trying to add CSS and Javascript hover affect to some images in drupal 7 .. something like in this tutorial. http://callmenick.com/2014/03/06/image-overlay-hover-effects-with-css3-t ... ...
0
votes
0answers
25 views

drupal_add_js doesn't 'stick' outside of hook_js_alter and hook_page_alter

Putting together a module that needs to insert javascript into each based on the contents of the page being viewed. The following code block works fine in hook_js_alter and hook_age_alter: ...
0
votes
1answer
16 views

the javascript for dragging and dropping not loading - drupal 7

for some reason when I add new modules the tabledrag.js is not loading. Tried taking the modules out, clearing cache several times. Aggregated js as well. Can anyone help.