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
0answers
10 views

how to execute style-behaviors before row-behaviors (using custom views templates)

I have a custom views style-plugin and custom views row-plugin. The style and row plugin each have associated javascript files that look like: var MYMODULE_STYLE = (function(me, $, Drupal, undefined) ...
0
votes
2answers
15 views

Use node_load via Ajax

I'm using horizontal parallax jQuery plugin and have a page--front.tpl.php file. That's my structure: MENU: <li><a id="mymenu" href="#/menucontent">news</a></li> When I ...
0
votes
2answers
27 views

problem merging views row-data into Drupal.settings

I have a custom view and a custom row template. For each row, the template defines a variable $rowdata. For example: > row #0: $rowdata = array(0=>array('a','b'), 1=>array('a','c')) > ...
1
vote
2answers
50 views

How do I add a dynamic Facebook like button to every node of a certain content type

One very comfortable solution to that problem is provided by http://drupal.org/project/fblikebutton. Unfortunately the positioning of the button isn't flexible enough for my needs. I want every ...
0
votes
0answers
14 views

add custom error code in submitted ajax webform in drupal 7

hi i am trying to add add custom error msg in the field of submitted ajax webform in drupal 7 can anybody tell me how to do it
0
votes
1answer
37 views

Is there a callback for the managed_file form element, called on succesful upload?

Is there a Javascript/PHP callback for the managed_file form element that is invoked when the file is successfully uploaded? (I mean when the "Upload" button is clicked, not when the form is ...
2
votes
1answer
30 views

How to make custom jquery method accessible from Drupal.behaviors, across multiple javascript files?

I have a custom views plugin. When the view is displayed, the javascript below gets loaded. Note the custom method, do_stuff, which gets called from within Drupal.behaviors. (function ($) { ...
7
votes
1answer
38 views

Which is the equivalent of php drupal format_interval for javascript?

I want to use with JavaScript and Drupal.t() the equivalent of format_interval(). With PHP I would use the following code. print t("!date ago", array("!date" => format_interval(time() - ...
3
votes
3answers
98 views

How to get full page width background slider

I am working on a drupal site, now my requirement is I need to slide the background images with fade effect on the home page. Is there any module to get this effect? Please suggest me if we can get ...
-1
votes
1answer
37 views

How can I debug this JavaScript issue?

I have a very annoying JavaScript issue on my Drupal 7 website. For debugging purposes, I've included a slideshow in the page.tpl.php file so it can be rendered on all pages (including the front ...
0
votes
1answer
69 views

Simple dialog module and custom JavaScript not working properly. Ready function called multiple times on click

I am using the following code to convert unoredered html list into a select drop down list: jQuery(document).ready( function($) { //build dropdown - main navigation $("<select ...
0
votes
1answer
33 views

How to override Drupal.ajax.prototype.beforeSend?

I need to add my own little if's and checks in 3 functions inside misc/ajax.js ( Drupal.ajax.prototype.beforeSend, Drupal.ajax.prototype.success, Drupal.ajax.prototype.error ) How can I ...
0
votes
1answer
20 views

Trigger 'Add another term' using javascript

Is there any way to simulate the click event of 'Add another term' using javascript? I tried like this jQuery('#edit-field-attribute-und-add-more').trigger('click'); but no effect
2
votes
1answer
33 views

error while editing views

When I'm editing a view and I click on one of the fields to edit them I get a javascript error Error: TypeError: c.curCSS is not a function Source File: ...
0
votes
0answers
27 views

Addng Javascript files

Another question for you guys. Let me first explain that I am adding javascript files the way I think they are supposed to be added, by putting them in my template file using drupal_add_js. However, a ...
1
vote
1answer
21 views

How to load conditionally a script depending on whether element exists in DOM?

I have a Drupal.behaviors.leftmenusticky script that converts a left menu to a sticky menu (100% height,position fixed and the like) but I want to drupal_add_js it only if the menu actually exists in ...
0
votes
0answers
22 views

Menu link - send value to drupal view

think I am on the last leg of this drupal site, but I can't figure something out. I have a book feed that is pulling in from amazon. I have a created a collapse-able tree menu using simpleTreeMenu.js ...
1
vote
1answer
31 views

Make a from element visible when a radio button is clicked

I have a problem to make a date and a list element in a form in HTML invisible if the user selects one way, and visible if the user selects two. How can I write the JavaScript code for that?
-1
votes
0answers
28 views

Drupal 7 piwik module javascript conflict with other modules js [closed]

When enabling piwik (or put code manually in footer) other modules js not work. I think piwik.js conflict with others js. I tested piwik with D6 and D7 and get error in firebug: "TypeError: ...
0
votes
0answers
58 views

Drupal 7 - CSS not loading in IE, js error 'jQuery not defined'

CSS isn't loading in IE only. I have the css and js files compressed. Only in IE i'm getting several js errors, starting with the error 'jQuery not defined'. The website is http://pattersoneng.com
1
vote
4answers
50 views

How to get jquery working on Drupal 7 - for Newbies

I have been reading many tutorials online on how to get jquery working on drupal 7. Although there are many lines of code and examples, what i cannot find is what piece of code to put where (maybe it ...
2
votes
2answers
45 views

How do I find out which module loads which javascript file?

I have been experiencing script related problems and would like to go through all the script files by disabling/enabling, to find out which is causing the problem. So I'd like to be able to find out ...
1
vote
2answers
71 views

Moving a div down if a zone is present using jQuery

I'm trying to move a <div> down if a zone is present, but I'm having a little trouble targeting the right classes, etc. // See http://jsfiddle.net/xgbzm/. (function ($) { if ...
1
vote
1answer
30 views

Form API focus on first input

When my form load I would like to set the focus on the first field in the form. I know I can use jquery to do this by doing $('inout id').focus();. Where would I put this code so that it only runs on ...
0
votes
1answer
22 views

Javascript widget

I'm extremely new to Drupal and have gotten to this point because I merely want a test page for calendar widgets that I want to develop. I am working with a product called Trumba which will generate ...
0
votes
2answers
33 views

jQuery Draggable plugin integration with Views 3

I want draggable and sortable contents by admin. So, installed jQuery UI and put this code in my main.js: $(function() { $( ".panels-flexible-region" ).sortable({ revert: true }); ...
0
votes
0answers
52 views

Selectivizr module not working. How to load Selectivizr so the theme would work on IE8?

There's module http://drupal.org/project/selectivizr, but it is not working. When installed it is not recognized and there is already an issue thread by someone and looks like author of the module ...
1
vote
2answers
19 views

How to exclude forms from processing by Hide Submit module?

According to module description this is possible. However I didn't find how to do it and I did not able to exclude form by any way, e.g: http://drupalcode.org/project/hide_submit.git/commit/8aab1ab
0
votes
0answers
26 views

Browser-specific Javascript conflict in Galleriffic Views

Use-case I ran into an issue when assigning the description field of Galleriffic Views to a entity via Views UI. This entity is created from the Reply module to be able to comment on entity; here, in ...
0
votes
1answer
25 views

Custom basic .js from theme dir prevents Splashify module from working

I am using latest Drupal 7 with latest Splashify version. Splashify (Splash in D6) is a simple module that uses jStorage js (from libraries/ dir) to add a splash/intro page for your Drupal site. So ...
1
vote
0answers
35 views

How to get current XHR object?

My requirement is to add cancel button to AJAX file upload. I know how to add Cancel button when upload starts but how can I get current XHR object to call abort() method on it? Current code: ...
0
votes
0answers
23 views

Views Exposed Filters loading javascript each time

I have an exposed filter with ajax enabled in a views. Every time I click different filter option it reloads the javascript. Is this the normal behavior or known issues with views 3? Is there any way ...
1
vote
2answers
59 views

Drupal JavaScript settings versus jQuery.data()

When I writing JavaScript code for my module, I could use jQuery.data() or the setting object passed to the Drupal behavior my module add. Should a module always use the settings object, or could I ...
0
votes
1answer
32 views

JavaScript loading order

I've installed eu-cookie-compliance module in few projects and everywhere it worked as expected but in one project I have problems with loading JavaScript in correct order. Even if I implement ...
0
votes
0answers
30 views

Ubercart Ajax Attribute Calculations breaks custom jQuery

I am using custom jQuery on product node to hide and show some text fields. However when I enable AAC, custom jQuery doesn't work. Here's the same thread on Drupal.org http://drupal.org/node/1306530 ...
0
votes
2answers
80 views

Text input onchange event

I'm working on a custom field that will store a string. The text will have a custom formatter applied to it that will manipulate the structure of the string (adding dashes in the right places). I ...
0
votes
0answers
244 views

TypeError: $(…).on is not a function $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)

I have installed a module to use less, so i installed a module less css preprocessor. After enabling this module when i reload my home page i am getting an error and cant able to write any less, ...
0
votes
1answer
75 views

Customizing tableheader.js Sticky table Header

As I am having a custom "position:fixed" top navigation bar in my admin pages, the sticky table header are being hidden behind it when I scroll-up. I went through tableheader.js and saw there is a ...
0
votes
2answers
75 views

Javascript cost calculator

I used JavaScript to construct my calculator, and I'm wondering how to get it to work. I've tried drupal_add_js(), but it didn't work. I've tried two different modules that incorporate JavaScript, ...
0
votes
1answer
71 views

Having trouble adding a custom js file to my Drupal 7 site

I added a javascript file to my site in the theme's .info file scripts[] = js/myjs.js The js file loads and I can see that it's included in the head when I load the site, however the jQuery ...
1
vote
2answers
47 views

How do i get the type attribute when adding javascript to drupal?

i'm adding javascript with drupal_add_js() but drupal cuts the script attribute "text/javascript" or just forgot it. It just adds the <script></script> tags. Can i add the ...
0
votes
3answers
67 views

How do I add javascript to a node or block

I've made a cost calculator script and want to use it on my Drupal 7 site. I heard to use drupal_add_js, but I don't know in what context.
0
votes
3answers
69 views

javascript add click hide

Hi I want to add a click event to an element that hides another element. I have added a script using my theme's info file, the contents follow: (function ($) { Drupal.behaviors.showhide = { ...
0
votes
0answers
22 views

Mobile nav to standard navigation loses functionality on screen orientation change

I am looking for the easiest solution to this problem: I have a javascript-enabled mobile menu for small mobile devices. I just found that when using Chrome on a Nexus mini tablet, it renders as ...
1
vote
1answer
35 views

How can I stop js script from running on mobile?

I need some help with a Zen subtheme using responsive-sidebars.css I have some javascript that I only want to run if the screen is bigger than 480px. The javascript is: (function ($) { ...
0
votes
0answers
56 views

Reload iframe onclick

I created a slideshow using views slideshow to pull images from nodes. This way drupal loads all images inside a page and script shows one after another. I would like to have a block on the same ...
1
vote
1answer
354 views

Automatically fill in “City” field when “Postal code” is entered

I encountered a problem that has been discussed many times but for which no solution has been written down yet. This is about Drupal 7. On my node add form, I have an "Address" field; a field ...
1
vote
1answer
40 views

How do I remove extra space in table field?

I'm using Views Module. I created a new ContentType with 3 custom fields: (text)Criteria, (decimal)Monthly, (decimal)Semester. I created a table style view that retrieved the ContentType I created ...
0
votes
0answers
191 views

views slideshow jQuery Cycle Custom Options how to use?

I display a view using slideshow format. To slide images I use controls only. After installing json2.js library I can add additional options displayed here http://malsup.com/jquery/cycle/options.html ...
2
votes
1answer
54 views

Help with wrapping character with CSS span using Jquery

I have this jfiddle working (http://jsfiddle.net/FJxcG/), but the same code does not work on my Drupal 7 website. I added the JS file to my theme .info file, and the JS is showing up in the source; ...

1 2 3 4 5 9