jquery

Avoid duplicating posts

Categories:

This code is very useful to avoid duplicated posts in your Drupal site. Some times when users try to submit a form, the form will take more than usual to reload or to respond. In those cases you want to have the submit button to disappear and to show a message saying that the form is being processed. I found this piece of code somewhere in the durpal.org site. I have been using it all the time and works like a charm.

This is a jQuery snippet and goes inside a block or page or node.

Asynchronous content loading in Drupal

Categories:

This is a recipe that I used to load the content of my "Portfolio of Websites" page. I took advantage of jQuery and Drupal menu system to generate an asynchronous http request, serve the content and show it inside a div tag.

This is the module code:

Syndicate content