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
votes
0answers
4 views

Can I use node.js to link neo4j with drupal

I'm building a web page with Drupal 7 and would like to connect it with a graph database. I have Neo4j in mind. My question is, if it would be possible to connect Drupal with Neo4j through Node.js? I ...
0
votes
2answers
29 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
22 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
28 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
19 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
30 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 ...
-2
votes
1answer
21 views

How to create form slider with 5 values [on hold]

How to create form slider like the screenshot.
0
votes
1answer
25 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
26 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
28 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
27 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
10 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
17 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
33 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
21 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
47 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
21 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
13 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.
-3
votes
0answers
21 views

Drupal 7 remove ligature

Drupal 7 remove ligature In a Drupal 7 website, it has ligature on. The following is the function to make the ligature. For example, it makes the "ff" in word "staff" into ligature. How to remove ...
1
vote
2answers
60 views

Problems adding javascript to a specific page

Drupal Version: 6.x Currently, I have a custom module created. In my template, I keep html code that I would like to embed within a container, such as a div, with a particular id. For this question, ...
0
votes
1answer
31 views

Can the jQuery global $ be protected from external Javascript?

I'm working on a Drupal 6 site that uses the Regpacks signup form service, and apparently the iFrame it creates includes Javascript that redefines the $ global as a function. So any Javascript on the ...
0
votes
2answers
25 views

Javascript amateur's problem [closed]

I have a function: jQuery(function($){ $(document).ready(function(){ $('.Testimonials').each(function(){ var theContent = $(this).html(); theContent = '-' + ...
0
votes
1answer
38 views

How to get a scrolling background image using CSS or Java Script within Drupals folder structure

I Found a site with a cool Background function. It scrolls like a slide show. Here is the example: EXAMPLE I am trying to figure out how to do this within Drupal. I have found a bunch of tutorials ...
0
votes
0answers
7 views

print commerce line items separately from order

I want to print a receipt for each line item in an order either as the order is saved. Think of each line item as a ticket and instead of printing a receipt for the order containing information about ...
0
votes
3answers
57 views

How add javascrip file to a node? (module)

I have create a module who add a new node named SquareOffs. I make that in my squareoffs.info file. I would like to add to that node a javascript file, squareoffs.js, but I don't know to do that. I ...
0
votes
0answers
9 views

Jquery Not Executing All Parts When Using Jscroll

I am using Jscroll to implement an infinite scroll retrieved by a custom module in Drupal 7. The infinite scroll is implemented via Jscroll and works fine. The only issue is that after scrolling to ...
0
votes
1answer
21 views

Pulling user data from external database

I have a game that utilizes mongodb to store the user information. What I am trying to do is use drupal as a community front so users can register for the game in drupal. The problem is that I don't ...
2
votes
1answer
85 views

Drupal Services 3 Login and CSRF

I'm working on a Phonegap app (JS) anndn I'm confused how to pass along the CSRF token with my requests. Would I need to call user/login.json first and then store the token? For future requests how do ...
0
votes
0answers
26 views

Views Ajax Pager not working when loading view with ajax

I have a page with a view that has a pager with ajax. the pager is working fine when the page first run. the page has a button that loads the next page using ajax, the view is loaded fine but the ...
1
vote
1answer
70 views

Drupal 8 JavaScript and Best Practice

I am building a theme for Drupal 8 that I want to make available in the drupal.org theme section. As such, I want it to conform to best practice code wise. When adding JavaScript, I notice there has ...
0
votes
1answer
19 views

Adding javascript to a view?

I have a view in Drupal 7 that displays a list of all the nodes of a content type in alphabetical order. What would be the best way to implement javascript that only displays nodes starting with a ...
-1
votes
1answer
58 views

Drupal 7 js popup [closed]

Trying to put a popup window on my drupal 7 site that hides/shows on click. Here's the popup.js file: Drupal.behaviors.my_custom_behavior = { attach: function(context, settings) { function ...
0
votes
2answers
54 views

Using Simple jQuery click() events in Drupal 7

I've been able to get jQuery to load and work for some basic things such as: (function ($) { console.log('jquery called'); $(document).click(function() { var h1 = $('h1').text(); ...
2
votes
2answers
66 views

Hide “Submit”/“Save” button until file has finished uploading

I'm having a problem where my site users are submitting a form before the files they are uploading into filefield are finished, this is causing an ajax error to pop up along the lines of "an ajax HTTP ...
-1
votes
2answers
59 views

Trigger highlight in maparea when mouseover on link

I've created a content type where I can load an image into a text editor and use Image Map Editor to create area to be highlighted when mouse moves over mapped region. At the same time, below the ...
1
vote
1answer
41 views

Construct the src in a javascript tag from node fields

I have a drupal 7 instance where I would like to create nodes that call reports from a separate site using javascript. Currently I construct the HTML tags myself which look something like this: ...
1
vote
0answers
27 views

Dropping host part of the url when loading resources

I have a particular problem with the site here. It's a b2b site and it has a word 'advertise' in the domain name. When Drupal loads resources (css/js) it refers to the full url, including that domain ...
0
votes
1answer
28 views

Custom Validation on Address Field

In addition to the validation that already takes place using the addressfield module, I'd like to check for (and fix) items like: Building to Bldg Room to Rm Circle to Cir Avenue to Ave Is there ...
1
vote
4answers
84 views

Hide/Show a DIV

In node.tpl.php, I have: <a href="#" id="hideshow">Show </a> <div id="comments" style="width: 300px; border" 1px solid #777; padding:10px;> Some ...
0
votes
1answer
21 views

browscap.ini is not configured in php.ini

In my status report I'm still getting this error: Browscap data / browscap.ini is not configured in php.ini. When I searched on the internet I found this topic that suggested this: [browscap] ...
0
votes
0answers
16 views

Trigger the 'add more' button with javascript, to add a set amount of field values

Is there any way to add a certain amount of field values to a standard node add/edit form (when unlimited option has been chosen) using a select input? At the moment I have this working using ...
0
votes
1answer
42 views

Field Collection Major Error! Help Needed!

Here what my screen looks like when I try to add new field collection item. http://i58.tinypic.com/hrf11d.jpg Then I got this message in Chrome when going back to the previous page in browser: ...
0
votes
0answers
16 views

leaflet behavior with js injector

I want to manipulate Leaflet behavior based on user events. I am using JS injector for a View in drupal 7. Something very simple like... (function ($) { Drupal.behaviors.leaflet= { ...
-1
votes
1answer
24 views

Link static HTML, Javascript and CSS3 in a Drupal Site

I am trying to have collaborative development of a HTML5 web app which people could navigate too through my drupal site. I was planning on putting the html, JS and CSS3 files in my sites/default/files ...
1
vote
0answers
35 views

Problem with Views accordion if using multiple accordions on same page

I'm using the views accordion module and it's working really well on this D7 site. However, a client has now requested that two different lists are displayed on one page. I've set them both to be ...
0
votes
0answers
16 views

How and where does drupal call Drupal.behaviors.password attach method?

I am experiencing a bug in my setup. The symptom is, that the translate variable in Drupal.behaviors.password in core module user/user.js populated from the passed in settings (settings.password) is ...
0
votes
2answers
27 views

Create a script page for handling ajax

I am a bit confused on the appropriate way to generate a drupal page for handling ajax posts. For example I'm creating a custom module that has favorites buttons. When a user clicks the button the ...
0
votes
1answer
42 views

Add html code to a content block

I need to insert an html code into a content block. As the html code has some javascript links and css, I've done a module to include all the references in the .info file. The problem is that I don't ...
0
votes
1answer
62 views

Colorbox Iframe Resizing

I am trying to resize an colorbox containing an iframe. The following code works fine on normal sites but in Drupal it is having problems. Can anyone suggest what I am doing wrong? The colorbox is ...