/ Published in: JavaScript
This will replace every token in document that is 32 digits in length. Written for mootools.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function replaceTokens(n) { $(document).getElements('input').each(function(e){ if (e.getProperty('name') && e.getProperty('name').length == 32 && e.getProperty('value') == '1' && e.getProperty('type') == 'hidden') { e.setProperty('name', n); } }); }