JavaScript is a prototype-based object-oriented scripting language that is dynamic, weakly typed and has first-class functions.
0
votes
3answers
33 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
21 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
18 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
53 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
10 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
8 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
19 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
8 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
20 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 ...
0
votes
0answers
13 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
11 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
21 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
25 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
31 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
10 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
30 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
27 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
28 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
37 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
38 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
25 views
Drupal Create Form with Javascript?
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
56 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
72 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
32 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
18 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 ...
0
votes
1answer
42 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
184 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
53 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:
...
0
votes
1answer
23 views
Conditional loading of admin? (When using a JavaScript router)
I am writing a Single Page Frontend to a Drupal backend using AngularJS.
It is basically a module that bootstraps the Single Page Application.
HOWEVER, because the application takes control over the ...
0
votes
2answers
40 views
Properly building array and using with drupal_json_encode()?
I am trying to pass data from my database to a javascript variable, however I'm not sure if I'm correctly using drupal_json_encode(), or correctly building my 2D array.
When I check my console, the ...
0
votes
1answer
58 views
drupal_add_js and variables into anonymous functions, objects undefined?
Pulling my hair out. Read a lot of stuff about scopechain and closure to tackle this one myself. And as i understand at some level, i can't get this to work.
I wrote a module for likebuttons (like ...
0
votes
1answer
43 views
Drupal Add Javascript type=text/javascript
I am trying to add javascript to my page and use type="text/javascript" however when I include the following it just encloses it in script tags. How can I fix this? Also, how can I add the ...
1
vote
1answer
13 views
Drupal Webform Customization
I'm using drupal 7, and I'm having a lot of trouble using the webforms.
I have a set of radio buttons, but each radio button needs to have an associated input field with it.
Code example:
<input ...
-3
votes
1answer
36 views
Change value input field according to other fields
I have 10 input fields when you create a product (= node). I have an input field amount, price & reduction and sell price. So when the field amount, price & reduction are filled in I want to ...
0
votes
0answers
30 views
Not able to pass PHP variable to JS file [duplicate]
Javascript works fine, but i need to get my_var variable from module. At the moment its not working.
Clear my page cache and browser cache several times.
The variable 'my_var' is showing value on ...
0
votes
1answer
152 views
How to pass PHP variable to javascript in Drupal 7
Javascript works fine, but i need to get my_var variable from module. At the moment its not working.
Clear my page cache and browser cache several times.
The variable 'my_var' is showing value on ...
1
vote
2answers
104 views
Changing file name on upload
I'm trying to automatically add prefixes to uploaded file names so they can later be processed by non-drupal scripts. I want to do that while the user is uploading files during creation/editing of a ...
2
votes
1answer
101 views
List registered users who are currently viewing a page
I'm looking for a module that, given a page URL, returns the list of users who are currently viewing it. The list should be dynamically refreshing to show page view activity in real-time.
Is there a ...
-3
votes
1answer
25 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
42 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 ...
1
vote
0answers
25 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
55 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
42 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
32 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
68 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
33 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
35 views
How do I add javascript to a module? [closed]
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 ...