Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Based almost entirely on jdporter's Free Nodelet Hack: Clear all Radio buttons, and in the spirit of putting my money where my mouth is (because the other day in the CB I mentioned such a feature would be nice to have in one's Message Inbox), I humbly offer the following:

<script language="javascript"><!-- function check_all_deletemsg(){ var lb = "\x5B"; var rb = "\x5D" var elements = document.getElementsByTagName('input'); var elnum; for(elnum=0;elnum<elements.length;elnum++){ var el = eval("elements"+lb+"elnum"+rb); var s = el.name; if (( el.type == 'checkbox') && ( s.substring(0,9) == 'deletem +sg' )) { el.checked = true; } } } //--></script> <p><a href="javascript:check_all_deletemsg()">Check All Deletemsg</a>< +/p> <script language="javascript"><!-- function clear_all_deletemsg(){ var lb = "\x5B"; var rb = "\x5D" var elements = document.getElementsByTagName('input'); var elnum; for(elnum=0;elnum<elements.length;elnum++){ var el = eval("elements"+lb+"elnum"+rb); var s = el.name; if (( el.type == 'checkbox') && ( s.substring(0,9) == 'deletem +sg' )) { el.checked = false; } } } //--></script> <p><a href="javascript:clear_all_deletemsg()">Clear All Deletemsg</a>< +/p>

(BTW, if you haven't already, hoof it over to Nodelet Settings and add the "Free Nodelet" to your list of nodelets.)

It should be obvious how to modify the code above to check or clear all "Archive" Message Checkboxes if desired. (Update: If it isn't obvious, view the HTML source of the Message Inbox page.)

Update: Many thanks to Corion for pointing out to Yours Truly that this could in fact be accomplished with Javascript!

HTH,

planetscape

In reply to Free Nodelet Hack: Check or Clear all "Delete" Message Checkboxes in Your Message Inbox by planetscape

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (8)
    As of 2020-07-14 09:07 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?