Cestfait.ch

  • Home
  • Drupal
  • PHP 5
  • Jquery
  • Web Dev
  • Sys admin
  • Logiciels libres
  • Videos
  • Divers
  • Nous contacter
  • Mon c'est fait!
Home

Datatables : Big form in POST

Submitted by Bill on Thu, 09/30/2010 - 11:29

Datatables est un excellent plug-in jQuery. Il permet de créer très facilement des tableaux avec pagination, tri et filtre en un claquement de doigts. Si on fait un gros formulaire avec, un submit n'envoie que les valeurs de la page affichée. J'ai un tableau avec une colonne de description et 5 colonnes de checkbox. Pour renvoyer tout ça dans le POST, voici ce que j'ai pu faire :

        $('#categoriesform').submit( function() {
            for(i=0; i<6; j++) {
                    var item = oTable.fnGetNodes()[i].cells[j];
                    var subitem = item.childNodes[0];
                    if (subitem.checked & subitem.type=="radio") {
                        var oField=document.createElement("input");
                        oField.setAttribute("type","hidden");
                        oField.setAttribute("name","h_"+subitem.name);
                        oField.setAttribute("value",subitem.value);
                        document.forms[0].appendChild(oField);
                    }
                }
            }
 
        } );

Et voilà, une hiérarchie provenant de SAP toute jolie dans une interface toute classe. Bon par contre, la fonction est lente quand on dépasse les 2000 lignes, un truc club serait de le faire faire via un web worker, de mettre un petit ("en traitement") pour que ça bloque pas le navigateur, mais pas encore HTML5 partout... Mais ça viendra !

Ca, c'est fait !!

Source : http://datatables.net/forums/comments.php?DiscussionID=109&page=1

http://datatables.net/forums/comments.php?DiscussionID=109&page=1
0
Log in to vote
Your rating: None Average: 1 (1 vote)
  • Login or register to post comments
  • Share this
Tags:
  • Jquery

User login

  • Create new account
  • Request new password
  • Sign in with Twitter

Translate

Sondage

Qu'elle version de drupal utilisez-vous ?

Submitted by Sir Squall on Tue, 04/10/2012 - 16:30
  • Login or register to post comments

Recent comments

  • Arf, je suis à l'armée!
    40 weeks 1 day ago
  • hahaha c'est juste! Il n'y a
    46 weeks 4 days ago
  • yeah comme sa fait plaisir de
    46 weeks 6 days ago
  • wouahou merciii :-) !
    50 weeks 5 days ago
  • J'y réponds aujourd'hui ici
    50 weeks 5 days ago
  • Salut, court article mais
    50 weeks 6 days ago
  • Oktoberfest power!!!
    1 year 3 weeks ago
  • yep je vais faire un petit
    1 year 5 weeks ago
  • It's regular approuved
    1 year 5 weeks ago
  • Pas d'exemple????
    1 year 5 weeks ago

Tags

cropping Divers drupal Drupal emacs firefox gmap Google Images Jquery jquery karmic koala La phrase du jour Lausanne Logiciels libres mysql PHP 5 RPG Sys admin ubuntu Web Dev yasnippet youtube Zend
more tags

Popular content

Today's:

  • Squall Beer Challenge '09
  • viportuguese-shop.com
  • 8ème Forum eCulture - ERACOM - 4 septembre 2009
  • Emacs Transparent
  • Grep afficher les lignes avant et après
  • Boxxy likes Drupal
  • Bash scripting MySql
  • Tinymce styles sorted
  • Drupal Mollom sa rox!
  • Pourquoi utiliser drupal_execute

All time:

  • Drupal 7 effet avec les jquery.ui.dialog sur Drupal 6 !
  • Dries Keynote DrupalCon Paris 2009
  • Drupal bridge zend yeah !!
  • Jquery slider c'est de la bonne !!!
  • Drupal and Zend, form validate :)
  • Jquery JSON en _POST
  • [Drupal] Lightbox avec une gmap! yeah
  • [Drupal] Domain Access & memcache sa donne quoi ?
  • viportuguese-shop.com
  • Node Import et Taxonomy CSV

Last viewed:

  • d7
  • Crontab all user
  • Cron Daily
  • Coyote Ugly @ Winterthur
  • Comment faire du multiple ssh en même temps ??
  • comment faire chuter la productivité au bureau
  • install emacs for php on windows
  • Comment encoder une vidéo pour qu'elle soit html5 friendly
  • Commenté-decommenté dans Emacs comme dans NotePad++
  • Commande bash

Twitter

Latest Articles

Derniers liens publiés

  • Get the list of all enabled module
    http://drupal.org/node/440962
  • Cloudflare et Dropbox nommés Technology pioneers
    http://techcrunch.com/2011/09/01/cloudflare-dropbox-palantir-and-kickstarter-named-technology-pioneers-by-the-world-economic-forum/
  • Apprend le javascript en t'amusant
    http://www.codecademy.com
  • EPSACrop sur Drupal 7
    http://www.aswissidea.org/
  • Drupal solr attachement intégration
    http://tika.apache.org/

Pub

Google gadget

Add to Google

Facebook page

jiwa

all good song

Partenaires

Cyber Warfare

Drupal Factory

Dev Factory

I love Smashing Magazine!
Fervens Drupal theme by Leow Kah Thong. Designed by Design Disease and brought to you by Smashing Magazine.