DrupalBin
Submit Code
About
Recent Posts
Code
1 hour 49 min
ago
Fix for double entries
2 hours 6 min
ago
Code
2 hours 15 min
ago
double entries
2 hours 26 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for dynamic change button label
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
if (Drupal.jsEnabled) $(function () { // add trigger to the button $('input#edit-ignore-node').click(function () { // change button label $(this).attr('value', 'Other label'); // get nid value nid = $('#id').val(); // use ajax to run a menu_path callback $.get(Drupal.settings.basePath + 'readpath/ignore/'+nid); // it will abort button submit return false; }); });
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.