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

learn more… | top users | synonyms

0
votes
1answer
24 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
0answers
10 views

Drupal 7 Extend footer to bottom of brower for short page

In Drupal 7, for short page without too much content, the footer can move up and leave some blank space below the footer. How to extend the footer to JUST the bottom for short page situation? Might ...
0
votes
2answers
21 views

Javascript amateur's problem [on hold]

I have a function: jQuery(function($){ $(document).ready(function(){ $('.Testimonials').each(function(){ var theContent = $(this).html(); theContent = '-' + ...
0
votes
1answer
30 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
38 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
1answer
13 views

Drupal 7 background image fixed without scrolling

In a Drupal 7 website, want to have background image fixed without scrolling. Used overflow-y:hidden to make it, but only working in Firefox. body { overflow-y:hidden; } The overflow-y ...
0
votes
0answers
5 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
17 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
49 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
15 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
60 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
34 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
45 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
55 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 ...
-2
votes
0answers
28 views

Drupal 7: Embed external js file per page (in editor)?

I read how to embed external js files in your template, but how can you embed js files in the for a single page in the editor? I tried jQuery with getScript() but no luck. <script ...
-1
votes
2answers
46 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
39 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: ...
0
votes
3answers
38 views

How to make single page website in Drupal

[single_page_website][1] The single page website module works for bartik and zen themes. How about other themes? How to make single page in Drupal 7 website generally?
1
vote
0answers
24 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
25 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
74 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
18 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
14 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
32 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
15 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
22 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
23 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
14 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
24 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
30 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
43 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 ...
0
votes
0answers
13 views

Gallery formatter Issues: Scrollbar but no green arrows in thumbnail div

When using Gallery Formatter, I don't see the green arrows. There is just a hideous grey bar. I tried using the jQuery updater module, but this didn't seem to work. (I tried 1.9 and 1.5 and 1.1) I get ...
0
votes
0answers
43 views

How to add a custom javascript code in a Drupal BLOCK

The title says it all. I want to add a series of advertising javascript code like adsense, facebook likebox javascript code. How can I add a javascript code as a block and put it on sidebar first. ...
0
votes
0answers
17 views

Need to know the most essential JS and CSS files for a Druapl 7 page

I am creating a module that has a page that is intended to be a viewer for a certain kind of content. The content itself is a Drupal Book viewer meant to behave like an epub reader. Basically I want ...
0
votes
0answers
35 views

my css and javascript files do not load and do not work?

my uploaded drupal7 website worked correctly for 2 days.but suddenly when i refresh it,every things go wrong. site loads with no css and no java,and no pictures. it said that the css (and js) files ...
1
vote
1answer
36 views

Dynamic arguments in an AJAX link

I have a link that uses Drupal's use-ajax CSS class to AJAX-load some node teasers. The callback for the link uses arguments to set a range in the Entity Field Query used to return the teasers: ...
0
votes
1answer
41 views

Need help with Drupal javascript behaviors

I'm a bit lost with this and could do with some help from a Drupal JS veteran. In my module I'm dynamically generating a settings form based on a CSS file, part of which provides a font select list ...
1
vote
1answer
71 views

Term reference with radio buttons + bootstrap tooltip

In the details of a user I have a term reference that is presented as radio buttons. You can select one radiobutton. The html looks like this: <div id="edit-field-abonnement-und" ...
2
votes
0answers
29 views

Drupal Create Form with Javascript? [closed]

I am wondering if there is a way to create a Drupal form on the fly with javascript? I know I can create a form, but how could I create all the Drupal hidden fields and other required pieces? Or if ...
0
votes
0answers
12 views

Is it possible to respond to other module's ajax events?

We are rendering a Google Map inside a Fieldable Panels Pane. After the pane is placed using the In Place Editor, the editor closes and the pane content is rendered with ajax. However, the map is not ...
0
votes
1answer
72 views

FullCalendar links open a new tab, don't want that

I have D7 with FullCalendar (7.x-2.0) installed. When viewing a month view and clicking on an event, the event opens in a whole new browser tab (no matter what browser I'm using). I don't want that, ...
0
votes
3answers
101 views

How to get drupal module path in javascript?

I'm trying to use this: var path = Drupal.settings.mymodule.basePath;but I'm getting this error: Uncaught TypeError: Cannot read property 'basePath' of undefined.
1
vote
0answers
40 views

How do I add onclick Google Analtyics custom event “add to cart” to add to cart button in Drupal Commerce?

I want to fire a Google Analytics custom event called "add to cart" when someone adds a product to the cart. I am using classic Google Analytics, not Universal. I tried adding this to the ...
0
votes
0answers
26 views

Implement vw, vh & vmin polyfill into drupal site

I'm trying to implement a polyfill into my drupal 7 site to give support to older browsers for vw units. The problem is that I don't really know what files are needed or where they need to go, as I've ...
1
vote
1answer
56 views

Injected javascript in google DFP module drupal 7

Currently I am setting up the Google DFP module and I have been trying to work out how the JavaScript is working. In the module there is a section for injecting JavaScript which is what Google DFP ...
0
votes
0answers
18 views

Overlay is throwing a JS error causing several Problems

I've been experiencing an odd problem lately with the Overlay Module (See Image). It's throwing errors on admin pages and causing CKeditor and other things like the Module Filter Module not to work. ...
0
votes
3answers
331 views

Execute jquery function if Ajax callback form complete

I got a custom ajax callback which replaces my checkbox options based on the select option. Now after the checkboxlist get's updated i need to execute a jquery function on those checkboxes. How can ...
0
votes
3answers
68 views

create a downloadable file after submit webform

Hello Im not sure if this can be done, but Im trying to make a simple app where you create your own lexical analyzer. So in the webform I ask the necessary information, then I need the following: ...