A drupal function used for adding JavaScript to a Drupal page.
0
votes
1answer
33 views
Setting a Drupal.settings JS variable from a form field
i'm working on my first custom module and really fumbling along :). thanks in advance for your advice!
goal
i've added a checkbox to the comment form. if the user leaves it checked, then following ...
0
votes
0answers
25 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
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 ...
1
vote
2answers
41 views
drupal_match_path() for multiple wildcard patterns?
I want to add some CSS and JS to multiple matched wildcard URL patterns. According to Add javascript to multiple specific urls, I can use a wildcard using drupal_match_path() and that works well for ...
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
67 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
1answer
75 views
drupal_add_js() won't work with footer scope
i 'm trying to add a file to end of body via template.php in mytheme_preprocess_page.
this is the line i have:
drupal_add_js(drupal_get_path('theme', 'mytheme') . '/js/file.js',array('type' => ...
0
votes
0answers
20 views
Calculations in a custom content type that display in saved content
Drupal 6.28, custom content type. I need to have users select numbers (possibly with attached text, e.g., 3 - meets expectations, 3.5 - exceeds some expectations) from two or three select lists (how ...
0
votes
1answer
80 views
JS Resize function for div containing a a slideview slideshow and set as a page background
This is for a drpal 7 install.
Is there a way to apply the same function they discuss in this thread
...
0
votes
0answers
59 views
drupal_add_js setting does not work in admin overlay
I do a form alter for the node edit form (hook_field_widget_form()). Within this alteration I add some settings to the Drupal.settings object with:
$settings = array(
'custom_api' => array(
...
1
vote
1answer
54 views
Generate js variable before javascript loaded
I have a block with invocation code inside(it invokes js code from OpenX ads server), my site is responsive and this block get cloned(with jquery .clone() function) on ipad or iphone version of the ...
1
vote
3answers
128 views
Add Google Analytics JS file to every page
We use Google Analytics on each of our sites for our own reporting. We have implemented GA using the Google Analytics module, and everything works as expected.
However, I'm also part of a large ...
0
votes
2answers
228 views
overlay does not work after enabling my custom module
I am using latest Drupal 7.
I just noticed my admin overlay is not working.
First I thought its due to Jquery Update contrib module installation however that not it.
Its apparently due to my ...
3
votes
0answers
720 views
TypeError: jQuery(“#mycarousel”).jcarousel is not a function [closed]
I added this jQuery function to my drupal7 header for jcorousel plugin.
<script type="text/javascript">
jQuery.noConflict();
(function($) {
$(document).ready(function() {
...
0
votes
0answers
77 views
drupal_add_js() includes JS with wrong weigth
A module I am using on my site uses the drupal_add_js() function to include some JavaScript. Although the function is used correctly the JavaScript file is included before the jQuery script which ...