Javascript
All you Javascript crazed developers out there, this is the group for you.
Drupal is in need of some usability improvements and after a few meetings and a lot of discussion, it is now time to take advantage of our new JQuery library in Drupal.
Accordion Blocks module released for Drupal
Folks, we're happy to roll out yet another module for Drupal. It's called “Accordion Blocks”. As the name says, this module provides an accordion effect to all your blocks. You can also apply jQuery UI themes through the configuration settings of the module.
This block is for those of you who deploy apps with a lot of blocks on either side bars, and are looking for newer usability enhancements with regards to visibility of the blocks. It not only minimizes all blocks on a Drupal page, but provides a cool accordion effect to help your user to concentrate on a single block at a time.
Has somebody tried to use the autocomplete jquery plugin with drupal?
I need a better autocomplete field for a Drupal project. Has somebody tried to use the autocomplete jquery plugin with drupal in any way? Any integration with the actual autocomplete functionality already found in Drupal?
Where should new functions go?
When you need to create a new function in your script (just the code in your Drupal.behaviors child function won't cut it), where in terms of namespace should that function go? Is there an official decision or consensus on this?
JQuery for CCK field best practices and help
Hi all.
I'm still relatively new to the development side of Drupal, so please excuse these dumb questions.
Essentially, I am attempting to add a jQuery plugin (http://plugins.jquery.com/project/spin-button) that works on a text box to increment/decrement an integer value in the box. That text box was created using the CCK for a custom content type. Upon inspecting the DOM when adding/editing that content type, I see the ID = "edit-field-player-strength-0-value".
So, I am attempting to use the Spin plugin with my CCK field in the following way:
<
ol>
Piggybacking on AHAH
For the Media module, I'm trying to attach a new behavior to an AHAH form submit button. I need to open a previously hidden form element, BEFORE the ajax has loaded. This is ultimately for a throbber/progress indicator, and to allow the user to enter meta-data without having to wait for the 120MB video to finish uploading.
Behaviors and Ajax
I am using the http://drupal.org/project/quicktabs module to load custom block content which comes from a custom module. In that content are links and I want those links to have the same functionality as the tab links, i.e. they should load new content into their respective tab.
There are two issues--one is to ajaxify links in content loaded by the initial click on the tab (or when the page loads) and then to again ajaxify links in content loaded after the user clicked on one of those ajaxified links.
CCK option field with dynamic option
I would like to create a cck field with dynamic options based on user's tag's input on the same form, can anybody help/showing me how to do this ? many thx
Ajax support / Auto-save support for tabledrag.js
Trying to get a bit more discussion to see if this is something people are interested in. At DCBoston the creator of the table-drag.js drupal extension to make all tables drag-and-droppy said it would be cool if there was a way to AJAX update it. Well, I have it working for the book's table and would love to extend my solution into a good one that would provide this functionality to all tabledrag's. Having some issues trying to think of how to make what i've done generic enough w/o having an overarching API for modifying drupal objects via js calls.
JSConf 2009
Meet industry experts and learn how to use JavaScript to build cutting edge mobile, desktop, server, and web applications. This conference based in Washington DC is a must attend for any web or JavaScript developer. The conference is digging deep into the vast world of JavaScript to expose how wonderful of a language JavaScript really can be. Did you know that you could build thick client desktop applications with JavaScript? Hows about that it is one of the only languages to bridge OO and Functional?
Pop Up Window to Display flash audio player
I desperately need the assistance of this group. I have let my javascript skills freeze in the year 2000. Now I can't make this work in Drupal as it is obvioulsy using techniques far more advanced.
I am attempting to get a pop up window to work from a menu item. The window would open a flash audio player.
I have gotten something to almost work from a node, but can't seem to get this to work from a menu item.
So, how do I open a sized new window from a menu item in Drupal?
jframe jquery pluging problem with drupal autocomplete
I'm facing a problem related to the use of the jframe jquery plugin (http://plugins.jquery.com/project/jframe) along with the autocomplete javascript in Drupal.
I'm using jframe to load some frames within a drupal page and in one case one of the frames loads a drupal form which contains an autocomplete field. That form element doesn't work properly. However, the same form loaded within another frame from the beginning works fine.
I've no idea where to begin to look for the problem. Any help will be very much appreciated.
The Ajax Forms Module
Ajax.module will AJAXify any Drupal form. This essentially allows for validation, preview, and submission without a page refresh. Ajax.module supports most forms out of the box. Ajax.module provides both an API for module maintainers as well as an admin interface for easy configuration.
Loading additional CSS and JS with AJAX/AHAH requests
An issue when loading and rendering content via AHAH is that the content may rely on CSS or JS code not present on the original page. In this case, there is a need to load and execute the additional code (CSS and JS files, inline scripts, Drupal.settings data).
There are now two API modules to provide this functionality.
AHAH/AJAX form validation and submission for Drupal core
Currently there are various contrib modules implementing form validation and/or submission via AJAX/AHAH.
The earliest is Ajax submit. Originally part of the Javascript Tools package, Ajax submit was moved to its own project for Drupal 6. In Drupal 5 Ajax submit combined an API and a UI. For Drupal 6, the UI was (temporarily) removed in order to produce a pure API module that could be used by other module developers free from a UI. At the same time the Javascript was rewritten to use the jQuery forms plugin.
Introducing the new JQuery Menu API
After several weeks of tangling with code I have release a new version of the JQuery Menu module that now provides an api for parsing hierarchical arrays into jquery click and expand menus. I have also released two new modules which make use of this api: the Advanced Taxonomy Blocks and the Advanced Book Blocks modules.
checking local file size
Hello all,
I know there are alot of ajax/php upload progress bars out there, but they're either complicated, unreliable, or just generally don't fit my needs. Thus, i'm making my own.
One problem I'm running into though, is how to check the local file size as compared to the uploaded file size.
I can check and display the total uploaded size (ie, 437kb uploaded so far...), but to get the percent, I have to know the total size - BEFORE it's fully uploaded. I would like to say "437kb of 932kb uploaded so far"... but how do I get the "932" from the local file?
Asynchronous module: 100% AJAX Drupal
We have seen a lot of interest in making Drupal load content dynamically. This enables many use cases not currently possible. E.g.: on a past project, we have been asked to make a video player play continuous, while the user browses the site. On a Drupal 5 site, the only way to do this was using frames, and frames sucks.
Some improvements were done in Drupal 6 to pave the way for AJAX. We got dynamic form submissions (AHAH), jQuery forms library and javascript behaviors can now be re-attached. On the server side, however, things haven't achieved such maturity.
Advice for a novice Drupal developer hitting javascript problems?
Hi folks,
I'm developing an online news site that uses the Drigg module, panels, OG and views.
Somewhere along the way, I've picked up some nasty problems that I believe are javascript related.
They have to do with how forms work on my site.
Problems:
- The CCK Imagefield forms no longer works as designed. When I browse for an image and DON'T click "upload" it works. If click the upload button, the image info is not saved.
Announcing Wysiwyg API - major milestone
I took the time to rewrite the Wysiwyg (Editor) module into a generic API over the weekend. So the primary concerns about TinyMCE-specific code all over the module are eliminated now. Also, you might have noticed, that I have added an example integration for FCKeditor already - which of course is rather a proof of concept than a fully-fledged integration (and it works cleanly 8).
So Wysiwyg has become a real API finally.
jQuery UI in core?
jquery UI has become nearly core in the jQuery project. Shall we push for it in core? Who wants to lead that effort? There is a lot of custom drupal js code that we can just use UI for (draggables, autocomplete, progress bar, spinner, ...).
JavaScript improvements (moved)
(Note: I have moved the contents of this node to a sub-page of the http://drupal.org/community-initiatives/drupal-core section: http://drupal.org/node/362430 - webchick)
trying to post to a login page with jquery
I am trying to login to another site remotely through jquery. I have set up a link on my site that will run my js file. My question is how do I either redirect my page or open a new browser window that will access the remote login page? The remote login page will accept the username and password as hidden fields. The username and password are being passed into my script from my drupal page.
Would I use the $.post function as shown below (although this doesn't work) or is there another way?
if( Drupal.jsEnabled){
$(document).ready(function(){
unable to use the jQuery plugin imgAreaSelect 0.4.2 with Drupal 5.8
Hello,
I've been trying to use the imgAreaSelect 0.4.2 plugin (http://odyniec.net/projects/imgareaselect/)
with Drupal 5.8 but have had no luck.
Finally i removed the files from drupal framework and took it to a simple test area where i created a test file for using the
vanilla jQuery 1.2.6 and another file which uses Drupal's jquery.js file.
The test case works for vanilla 1.2.6 js file but breaks down for drupal's jquery.
I've attached the relevant 6 files
The error i get in when using Drupal's jquery is
Selecting a radio button using JQuery
Help appreciated -
I'm building a node form where the form will reveal/hide portions depending on the users choices. To do this I'm using jQuery to manipulate the DOM. I'm having a lot of issues with the radio buttons.
First patch for FCKeditor support hit Wysiwyg's queue
I have spent the last hours to get a first draft of FCKeditor support in Wysiwyg Editor module.
http://drupal.org/node/282717
It's still very rough and dirty, but it outlines what can be done and what needs to be done for multiple editor support in Drupal via one API module.
Now I badly need some feedback from folks that are interested in centralized Wysiwyg editor support, who know jQuery + JavaScript, and who might have ideas and suggestions on how to solve the outlined design challenges. Of course, all editor module maintainers are implicitly more than welcome.
How to make a jQuery plugin work?
I begin this discussion knowing full well this is a question only a themer could ask, but how do you get a jQuery plugin to function?
Looking for Szeged co-presenters for jQuery Tutorial
[Cross-posting from the Raincity blog]
I've submitted a proposal to the DrupalCon Szeged site for a tutorial session on jQuery in Drupal. I'd reallly like to get two co-presenters on board to structure it into three 30-minute tutorials, each covering two or three of the following suggested topics:
PHP/MySQL Developer | CEMPER GmbH
CEMPER.COM Internet Marketing Services is seeking a
Web Developer
Hopefully helpful ramblings about jQuery in Drupal
Hi All,
I already included a link to Part One of this post in a thread below but I've just written Part Two and would love to get some feedback from other jQuery-loving Drupal developers. It gives a brief overview of the history of jQuery in Drupal, discusses jQuery Update module and the difficulty of bridging separate release cycles, looks at best practices for writing jQuery and provides a brief overview of AHAH and Drag & Drop in Drupal 6.
.form-select has no properties. jQuery problem.
Hi all.
I try to add some functionality to ''Multiselect'' module.
I`ve wrote simple jQuery script which fills unselected box with title of nodes from selected vocabulary.
Here is the code:
$('select.multiselect_taxonomy_vids').change(
function() {
base_path = "/inspirander";
fieldid=this.id;
vid=$('.multiselect_taxonomy_vids').filter('[@id='+fieldid+']').val();
seloptions='';
$('.multiselect_taxonomy_sel').filter('[@id='+fieldid+']').each(
function(){
for (var i=this.options.length-1;i>=0;i--)
{
jQuery UI in Drupal 5
I'm trying to put together a sort of roadmap relating jQuery (and jQuery UI) at its different stages to Drupal 5 and 6 so that people can get an overview of the jQuery functionalities that are available to them. I will eventually post it to this group and if there's a suitable place in the handbook for such a thing.
Drop Down List again
Sorry that I post this discussion again but I've see that it is private and I want it public.
I have a module and for a menu link will be displayed a form.
1. In this form I have 2 select element. First element is populated with some authors name. The second select element must be populated with the books for the selected author from the first select element.
2. For each selection in first select element, the option array for the second element must change.
3. I must have a second submit button, or a button and have option to call a function when I press on it.
Ingredients for an Album/Track page
This wiki is an attempt to explore the various options we have to build an album page with the ability to play individual tracks as well as the complete album/playlist. Ideally we'll get input/advice from some of those who have built and/or implemented this type of solution.
Packing Javascript, Dean-Edwards-style?
I've been looking at the results of Javascript optimization in Drupal 6 and it appears to me to be not all that optimized. It should really just be called Javascript "concatenation" as it doesn't appear that comments or white space is removed.
I'm guessing that there were problems with double-packing of jquery.js.. Can anyone point me to the thread where this was discussed?
Drop down list problem
Hi!
I have a module and for a menu link will be displayed a form.
1. In this form I have 2 select element. First element is populated with some authors name. The second select element must be populated with the books for the selected author from the first select element.
2. For each selection in first select element, the option array for the second element must change.
3. I must have a second submit button, or a button and have option to call a function when I press on it.
If anybody could help me with any idea, suggestion, documentation.
Thank's!
jQuery plugin manager
Hello,
I would like some community feedback on IMO a great need for a jQuery plugin manager. I have seen many jQuery plugin 'wrapper' modules flowing through the feeds, and I think this is something that we should address. I am certainly willing to expand on my prototype which can be found at http://drupal.org/project/plugins
Any feedback or suggestions would be great.
jQuery plugin manager
Hello,
I would like some community feedback on IMO a great need for a jQuery plugin manager. I have seen many jQuery plugin 'wrapper' modules flowing through the feeds, and I think this is something that we should address. I am certainly willing to expand on my prototype which can be found at http://drupal.org/project/plugins
Any feedback or suggestions would be great.
Edit in place
It would be great to develop edit-in-place capability where you can be viewing a page and click on the content and have it turn into an editable text area without going to a separate edit form, or be viewing a Views list and click on a field in the list and have it turn into an editable field that you can use to update the value. When using this with Views, it could almost be like having spreadsheet capabilities. This would be a killer feature.
Edit in place
It would be great to develop edit-in-place capability where you can be viewing a page and click on the content and have it turn into an editable text area without going to a separate edit form, or be viewing a Views list and click on a field in the list and have it turn into an editable field that you can use to update the value. When using this with Views, it could almost be like having spreadsheet capabilities. This would be a killer feature.
Latest Ajax Popup News
Trying to edit the Ajax Popup wiki is just getting me the white screen of death, which is bad since it is all painfully out of date.
The big news is that all three patches have been rolled back into one. And it is prettier. More info at:
http://drupal.org/node/193311#comment-770004
I have integrated all the feedback I got at DrupalCon Boston, so I see it at the end of it's second phase of development. Now it is ready for some serious tire kicking from the rest of the world.
Latest Ajax Popup News
Trying to edit the Ajax Popup wiki is just getting me the white screen of death, which is bad since it is all painfully out of date.
The big news is that all three patches have been rolled back into one. And it is prettier. More info at:
http://drupal.org/node/193311#comment-770004
I have integrated all the feedback I got at DrupalCon Boston, so I see it at the end of it's second phase of development. Now it is ready for some serious tire kicking from the rest of the world.
AJAX & Drupal: Post/Response Times
Hi,
I posted a message over at the Drupal Forum's asking about excessive post/reply times that I see on Drupal 5 using AJAX. With a simple change to bootstrap only the Drupal database, my AJAX post/response times decreased from 900-1000ms to 94-120ms per AJAX query. Instead of copying my post here, the link is below:
I have a few questions at the bottom of my post and maybe some of the guru's in this group can shed some light in case there are alternative solutions for Drupal 5?
AJAX & Drupal: Post/Response Times
Hi,
I posted a message over at the Drupal Forum's asking about excessive post/reply times that I see on Drupal 5 using AJAX. With a simple change to bootstrap only the Drupal database, my AJAX post/response times decreased from 900-1000ms to 94-120ms per AJAX query. Instead of copying my post here, the link is below:
I have a few questions at the bottom of my post and maybe some of the guru's in this group can shed some light in case there are alternative solutions for Drupal 5?
Developing AHAH Submit Functionality
This post is intended to pull together my thinking and some of the discussions that took place in Boston around how to get a solid framework in place for real next-generation javascript into core for Drupal 7. My specific interest is in taking the promise of Nedjo Rodgers ajaxsubmit.module (part of the jstools project) and overhaul it to work in harmony with the amazing new AHAH features in Drupal 6.
My objective is to release a solid contrib module for Druapl 6.0 which provides a good framework for developers interested in this functionality, and implements some useful default behavior that will give it some purpose and life "out of the box." Assuming I can make decent progress on this in the next six weeks, this is a good way to figure out what's needed, and define functionality and code which can be engineered into Drupal core for the 7.0 release.
The full post here contains my initial spec, thinking on how to accomplish all this, and first experiments with extending the existing ajaxsubmit module.
Developing AHAH Submit Functionality
This post is intended to pull together my thinking and some of the discussions that took place in Boston around how to get a solid framework in place for real next-generation javascript into core for Drupal 7. My specific interest is in taking the promise of Nedjo Rodgers ajaxsubmit.module (part of the jstools project) and overhaul it to work in harmony with the amazing new AHAH features in Drupal 6.
My objective is to release a solid contrib module for Druapl 6.0 which provides a good framework for developers interested in this functionality, and implements some useful default behavior that will give it some purpose and life "out of the box." Assuming I can make decent progress on this in the next six weeks, this is a good way to figure out what's needed, and define functionality and code which can be engineered into Drupal core for the 7.0 release.
The full post here contains my initial spec, thinking on how to accomplish all this, and first experiments with extending the existing ajaxsubmit module.
Web Services in Drupal 7
Just a quick note that nedjo posted a note about Services module going into core. This would allow use of XML-RPC, JSON, RSS, REST, SOAP and more to be loaded through a common Services API.
A Code Sprint will take place in Boston this coming Friday that will focus on the inclusion of this new Services API.
Web Services in Drupal 7
Just a quick note that nedjo posted a note about Services module going into core. This would allow use of XML-RPC, JSON, RSS, REST, SOAP and more to be loaded through a common Services API.
A Code Sprint will take place in Boston this coming Friday that will focus on the inclusion of this new Services API.
Getting Modal Dialogs in Drupal 7 - the wiki
Update: This all needs to be updated with all the BostonCon information and changes. In the mean time, the best place to catch up is: http://drupal.org/node/218830#comment-764167
Since my drupalcon session did not make the cut, I am putting my notes here. Hopefully we still can get some momentum building for the code sprint (maybe a BOF?). I would be thrilled if anyone wants to jump in a review these patches, advise on the overall direction, or jump in on the TODO items.
Popups: Adding the core modal dialog API (http://drupal.org/node/218820)
Getting Modal Dialogs in Drupal 7 - the wiki
Update: This all needs to be updated with all the BostonCon information and changes. In the mean time, the best place to catch up is: http://drupal.org/node/218830#comment-764167
Since my drupalcon session did not make the cut, I am putting my notes here. Hopefully we still can get some momentum building for the code sprint (maybe a BOF?). I would be thrilled if anyone wants to jump in a review these patches, advise on the overall direction, or jump in on the TODO items.
Popups: Adding the core modal dialog API (http://drupal.org/node/218820)






















