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
19 views

onClick event on the submission button of an AJAX form

I've an AJAX form, built by contributed module, and I need to add a JavaScript listener (for the click event) to the submission button, but I did not get to work. I have tried: Adding the listener ...
-1
votes
0answers
7 views

Module for animation when link is clicked

If a user clicks ANY of the links on the drupal site I am setting up, I want to show animation before the transition to another node/page. Is there a module for this? Or would jquery work/how would I ...
0
votes
0answers
18 views

Javascript to set webform Field Value based on earlier field

I've got a webform setup on Drupal 7, with mmulti-pages and using the same page conditional add-on (actually its now part of the webform 4 core, and it works fine) At the start the webform asks for a ...
0
votes
0answers
26 views

Ajax form to upload image can't update nodejs socket content [closed]

I'm trying to make a chat which use nodejs_chat The module only allow us input some text message to each us, but is not enough for us . We also need to upload image. So I make a ajax form under the ...
0
votes
0answers
18 views

Display a page portion from another page [closed]

May be this is not connection with drupal, Sorry for that may be someone will help me on this scenario, I have two pages as like the image, if i click on page 2 link that i want to load the page 1 ...
0
votes
0answers
21 views

Open Drupal overlay using javascript

Is there any way to open the core overlay window with a Custom URL using JavaScript?
2
votes
1answer
40 views

Are there any acceptable uses for $_COOKIE['has_js'] outside of core?

Drupal 7 has a cookie called has_js. drupal.js sets this cookie, and it is used by the Batch API and the authorize.php script. There is a rather old issue about this cookie, backport ...
0
votes
0answers
21 views

Drupal 7 with WYSIWYG and TinyMCE 3.5.8 strips javascript

Whenever I put javascript into the html editor it gets stripped out. After doing some searching I modified the tinymce.inc file in the wysiwyg module by changing $settings['extended_valid_elements'] ...
0
votes
0answers
14 views

Javascript in a node via CK Editor

I am using CK Editor (version:'4.3.3',revision:'7841b02') with Drupal (core: 7.26) via the WYSIWYG module (7.x-2.2). I'm also using Workbench (7.x-1.2) and Workbench Moderation (7.x-1.3), which may or ...
-1
votes
1answer
33 views

Click event not always fireing in Drupal behaviors

I'm having a strange problem with a form. Sometimes I have to click the submit button twice to make it submit my form. It also seems to work if I click outside the form before I click submit. The form ...
0
votes
0answers
5 views

Views_autorefresh - prevent updates from scrolling the page

I am using the autorefresh module to update my pages so that users do not have to reload pages manually. The refresh happens every few seconds. My problem is: Every time the page updates, the page ...
0
votes
2answers
30 views

How do I add javascript to a module?

I'm building a module with a basic form. This form has some js attached to it that I want to keep in the module, so that it's not cluttering my regular scripts file. How do I add it to my module? I ...
0
votes
0answers
29 views

ckeditor not loading on element generated via ajax call?

I am using custom form and generating form elements with ajax call but textformat is not loaded with ckeditor. Here is my code: function form_callback($form, $form_state){ $form['features'] = ...
0
votes
1answer
10 views

Add javascript scolbar & effects to Block from module

I have a block that was created with Social Feed Module. The block aggregate social feeds. I want to add a scroll-bar to the block it self. I have seen some ...
0
votes
2answers
49 views

My javascript is making the drupal admin menu disappear. Not sure how though

Ok, so any time I try to view a page on my Drupal 7 site while I am using either drupal_add_js(drupal_get_path('module', 'floormap') . '/includes/javaScript.js'); or ...
0
votes
0answers
25 views

How to output content use my custom way?

For example, I have two site (A & B), A is built by drupal. On site B, I wanna display a list of news from site A. I choose to add such code to B's page <script ...
0
votes
0answers
13 views

Add a button to a custom page to call a function from my module.

Having built a report page for property payments I would now like to offer up a button to export the report to excel. I will use the PHPExcel module to write an export function in my custom module. ...
-2
votes
1answer
32 views

behaviours.js syntax (Leaflet Map)

An answer is given here to a problem concerning Leaflet Maps My question: How would I adapt this code (yellow border here) to the syntax of my-theme/my-theme.behaviours.js ? I think it would ...
0
votes
1answer
22 views

Modify checkbox event on custom line item type to hide show div

I have a block of custom length fields and a rule to figure them and put the correct total in the cart however I want to hide the div that contains them unless the exact lengths checkbox is checked ...
0
votes
1answer
27 views

Get node path via javascript

I am attempting to add history states to view items that are loaded using the infitine scroll module. On my first attempt, I am adding the following code to the infinite scroll.js file in the load ...
0
votes
1answer
53 views

Stop Youtube when changing between tabs (Quicktabs)

I am trying to stop a Youtube video when I change between tabs using QuickTabs but the video is still running, even in the iPad, I can even play the both videos, in this case Trailer and Full Movie at ...
-1
votes
0answers
9 views

Shopping cart bug, page not reloading on same page in Internet Explorer

If you go here: http://cie.austin.utexas.edu/uex-cm/summer-2014 Add an item and then empty it in Internet Explorer, the page redirects to another page instead of the current page. Can you see ...
0
votes
2answers
59 views

Enabling JavaScript from CKEditor

I would like to enable javascript to be added inside CKEditor. The editor filters all my javascript and I would like to make a transtision from an image to a youtube iframe, here is the code that I am ...
1
vote
1answer
928 views

Eliminate render-blocking JavaScript and CSS in above-the-fold content

I am Building a Drupal 7 site. Thess are some of the modules I use (it may help you understand which CSS & JS I use): Adaptivetheme (theme), Views & content panes, Panels & Mini panels ...
0
votes
0answers
40 views

Drupal Image Collage- Responsive/Adaptive?

I am using the Collage Formatter module. Works great, but seeing the rest of my site is responsive, I need the collage to become responsive as well. I am using collage formatter in a view, and its not ...
0
votes
1answer
31 views

image hover with views

I have created 2 image-fields in my content type image-main and image-hover. The image-main is an album display and when you hover the album cover it must change to the image-hover. How can I get ...
0
votes
4answers
132 views

Change in URL for social networking

I am using Drupal for running a website. I have integrated the "Share bar" module to share the current page in social networking sites. I know from the plugins code of Facebook that the share count of ...
0
votes
1answer
24 views

Close webform error messages

I'm using the webform module for a contactform. But when the submission doesn't validate the user can't click away the alert box. <a href="#" class="close">×</a> Look's like there is ...
1
vote
0answers
25 views

Javascript related problems when using old versions of IE and a proxy server

I have a site that is fairly javascript heavy. It uses the edit module with some custom javascript overrides, some other plugins like fancy scrollbars, flexslider, image cropping, etc. as well as a ...
0
votes
1answer
32 views

Is there a reliable way to show Drupal messages from JavaScript?

I need to show status messages (the kind typically shown by drupal_set_message()) in my module's JavaScript code. How can I do this reliably, such that the theme and placement of the messages remains ...
1
vote
0answers
30 views

What is the use of Drupal.settings.ajaxPageState object?

I am working on a Drupal site on which a functionality breaks because the value of Drupal.settings.ajaxPageState.js gets reset to an empty array instead of an object containing the list of js files. ...
0
votes
0answers
25 views

When and how should I use Drupal.behaviors?

I've read the remarks (below) from drupal.js, but I'm still not sure what Drupal.behaviors is for, when I should alter my code as suggested, and how (there are two code blocks in the remarks). Can ...
0
votes
1answer
21 views

Adding sitewide JS file in module

I have a module that will provide a dropdown when creating a new block. Selecting either none, option 1 or option 2 will add a corresponding class to that block. That class will be targeted by a small ...
1
vote
1answer
19 views

Allowing ajax link clicks to propagate

A click event on a link with the use-ajax class on it does not seem to propagate up the DOM. Is this true? If so, is there a setting that will allow it to propagate? Not being a JS whizz, I'm ...
0
votes
0answers
35 views

JavaScript Conflict in Fivestar Module

I have added Fivestar Module as a Field (Widget: Rated while Viewing) in my content type. Before Adding the Module, My display was fine as in the picture below: After Adding Fivestar, the display ...
2
votes
4answers
114 views

How can I use Javascript (Google Analytics) in my “Rewrite Results” in Views?

I'm trying to track downloads as events in Google Analytics for file fields. The links are displayed in Views using "Rewrite results." I tried the following: <a onclick="var ...
2
votes
1answer
56 views

ApacheSolr Search results with AJAX (D7)

I've been searching the web for ways to display my search results directly in a block after submitting the input form with AJAX. Unfortunatly, i haven't found alot of good information on this ...
1
vote
0answers
52 views

Fixing D7 Bug: Block caching within views breaks JS

I have a number of block on pages throughout my site which use views. Within these blocks I have slideshows(flexslider) or use masonry to produce a dynamic layout. If I enable block caching the JS ...
0
votes
2answers
60 views

Validate date selection in date picker

I am using a javascript datepicker to allow users to select a date (which I have functioning in my form). What I don't know how to do is limit the dates that can be selected. Is there a way to do this ...
0
votes
2answers
76 views

js doesn't work for anonymous in D8

for admin work good! for test i just write this: jQuery(document).ready(function(){ alert(1) }); Thanks for any help -) UPDATE: my JS file attached to tag but code not run, any js code not ...
1
vote
2answers
55 views

with BEF collapse expand items under their parent

How to collapse and expand items under their parent using better exposed filter and Nested Checkboxes .. What i mean ...that all the child items to be collapsed and they expand when the user click on ...
0
votes
1answer
42 views

Passing Settings from Drupal Module to Javascript: Uncaught TypeError: Cannot read property

In my module I have the following code. $my_settings = array( 'basePath' => '/', 'my_locs' => $my_locs // Array of numbers ); drupal_add_js(array('my_module' => $my_settings), ...
0
votes
0answers
10 views

Problem in sweaver font-family select list [duplicate]

I have installed sweaver module in my website. Issue 1: There is a problem in selecting font-family in sweaver tab in google chrome browser. I can't select a font-family from font-family select ...
0
votes
1answer
26 views

How to desactivate jquery_update logic for the homepage

The objective of this is to remove all legacy javascript files from the homepage except for the new javascript files I specifically want to load. Here is how I remove all the Javascript files I don't ...
0
votes
0answers
22 views

How to import css javascript & HTML into block? [duplicate]

Is there anyway to import my css and javascript external files into HTML block? I really try to make css and js inline with HTML but Drupal stripe the tags, thus i try syntax highlighter and cpn but ...
0
votes
0answers
31 views

Open video from view in new window popup Drupal 7

I like open video like this web site drupal: Formation Linux LPIC-2 Deny download Thanks
0
votes
0answers
28 views

How to add link to the file in Elfinder?

I want to have links that should direct to the files in Elfinder. I mean when you click to that link you are automatically redirecting to the page with Elfinder and Elfinder opens a directory where ...
0
votes
1answer
80 views

Clicking any hash/“#” link, even in Seven themed edit page tabs, scrolls to top of page?

I have a custom themed Drupal 7 site here. If you click on the left or right arrows in the top slide show or bottom "logo parade", the browser will scroll to that hash tag (undesired). Also, when ...
1
vote
1answer
27 views

Display discount ad when people visit the page

A client of mine wants to display a discount advert on top of the site when user visited the page, so I imagine it will be triggered by the onload handler of my front page. I thought I can display ...
0
votes
1answer
89 views

Change end date automatically after changing start date

I would like to be able to automatically change the value of the end date to be the same as the start date after changing the start date. Ex: right after changing the start date to 12-12-12, the end ...