JavaScript is a prototype-based object-oriented scripting language that is dynamic, weakly typed and has first-class functions. Drupal provides APIs to work with JavaScript and AJAX. These APIs shouldn't be ignored when working with JavaScript in the context of Drupal. Also, Drupal uses jQuery and ...
0
votes
0answers
19 views
AJAX submit ignored if comments form is loaded with AJAX
In D7, I have a custom module enabling AJAX form submission on comments forms. That is working great.
I also have comments being loaded in the commentsblock module using block_refresh with the below ...
1
vote
1answer
31 views
Add JavaScript 'effects' to be used with AJAX form submissions
Consider the following code:
$form['actions']['submit']['#ajax'] = array(
'wrapper' => 'apple-node-form',
'callback' => 'node_add_callback',
'method' ...
1
vote
0answers
7 views
Ajaxified group of flags
I have a custom content type named Movie.
Every user must have 3 lists of movies :-
1) seen
2) want to see
3) watching right now
Right now i am solving these by adding three flags(seen,want to ...
1
vote
1answer
30 views
How to make Toolbar unsticky at the top?
Drupal 7
The toolbar is sticky at the top even you scroll down the page.
How can I make it unsticky at the top?
Thanks.
0
votes
0answers
22 views
Ajax is not working for Drupal comments form
I have created two content types slideshow and slides. I am assigning slides to slideshow with the help of node references. One slideshow can contain n number of slides. When I am showing slideshow I ...
1
vote
1answer
28 views
Creating JS file on the fly
I have a code that generate a big bunch of javascript code and I would like to create a .js file on the fly and include the code in it.
The code would be reconstructed at each cache destruction. The ...
0
votes
0answers
10 views
How to avoid redirection to front page in photo gallery using Views
I'm using Drupal 6 Fivestar, voting API,voting api_autoremove modules for voting system.There is a Photo gallery in my site where the users can vote for their desired picture.I brought the pictures ...
0
votes
1answer
54 views
How to read the session cookie with javascript?
I'm trying to detect with javascript if a user is logged in.
For some reason the drupal session cookie is not showing up when I use
alert(document.cookie);
It does show ...
1
vote
1answer
33 views
Getting data from a form field using JavaScript in Drupal6
I have a form with two autocomplete fields: 'province' and 'city'.
When a province it's written I would like to get the input from that field in order to use it in a query for only showing cities ...
1
vote
2answers
46 views
jQuery code is loading content in an unpredictable way
I've got a view of teasers; each teaser has 3 clickable <a> elements:
"morelink" toggles an extra row in a table.
"noderef" loads the referenced node into a div.
"ajaxview" sends the node id ...
0
votes
0answers
28 views
How to find html substring including tags in a html string in javascript using ckeditor? [closed]
I have a string and substring , I would like to get the first index of substring in that string , i use string.indexOf for this purpose but when there are html tags it always return -1 . I am working ...
0
votes
3answers
46 views
How can I insert Javascript right before the body in my custom theme?
I want to make the same jquery menu in my custom drupal theme but I could not insert the inline script right before the body.
I made a separate JavaScript file, and added to my custom .info ...
0
votes
1answer
38 views
Load an iFrame to Drupal with JavaScript
Because of Google Analytics I would need to use JavaScipt to load iFrame to my Drupal template. I use this only just on one custom content type template.
Can I put the JavaScript straight to the ...
0
votes
0answers
25 views
JavaScript calculators into nodes in Drupal 6
What is the exact method of making my JavaScript calculators work in Drupal 6?
Until now, I have added the complete JavaScript code along with HTML to a node body. Now when I open this node page, it ...
0
votes
2answers
57 views
What is the best way to add the latest version of jQuery to a theme?
This is just a simple question I have. I'm most interested in seeing what others are doing to use the latest version of jQuery in themes.
The reason for this is that some of the best jQuery plugins I ...