The “show quoted messages” link breaks other controls

In Sharepoint discussion boards, there is the “show quoted messages” button within each post. It allows to collapse/expand the quoted message.

However this button causes a serious problem:
If you place additional postback sensitive controls on the discussion page, they might break whenever the “show quoted messages” is clicked. This happens, because this button does not perform a valid postback.

Here is a JS based fix:

// workaround for broken show-quoted-text button in discussion board
// see core.js for the original function

function ShowQuotedText(guid, anchor) {
    var frm = document.forms[MSOWebPartPageFormName];
    frm.CAML_ShowOriginalEmailBody.value = frm.CAML_ShowOriginalEmailBody.value.concat(guid);
    if (frm.action.indexOf("#") > 0) {
        frm.action = frm.action.substr(0, frm.action.indexOf("#"));
    frm.action = frm.action.concat("#" + anchor);
    // a raw form submit will cause the people editor to break
    // perform a proper postback instead
    __doPostBack('__Page', ''); 
    return false;

Simply include this snipped in the header of the affected page, or in an external JS file. Just make sure that it is being loaded after core.js.

8 Responses to “The “show quoted messages” link breaks other controls”

  1. 1 strony internetowe February 7, 2014 at 2:56 am

    Great delivery. Great strony internetowe points. Maintain the amazing work.

    This kind of information strony internetowe is priceless. When could I discover

  2. 2 here April 5, 2014 at 2:21 pm

    Hi there, here I just wanted to tell you, I loved this blog post
    link. It was actually inspiring link. Continue on posting!

  3. 3 tu April 8, 2014 at 12:57 am

    Incredible points. Sound tu arguments. Sustain the
    great effort.

    This particular text transport medyczny is priceless.

    Where can I discover more?

  4. 4 transport medyczny Lublin April 17, 2014 at 5:52 am

    Hi, transport medyczny Lublin merely wanted to mention, I loved this
    post transport medyczny Lublin. It actually was practical transport medyczny Lublin.
    Keep going publishing!

  5. 5 suplementy April 21, 2014 at 10:55 pm

    Hi there, suplementy I just want to mention,
    I enjoyed this post odżywki dla kulturystów. That was
    helpful reduxil. Keep on publishing!

  6. 6 depilacja laserowa Radom April 24, 2014 at 7:51 pm

    Incredible points. Solid depilacja laserowa Radom discussions.
    Continue the great work.

    This kind of information depilacja laserowa Radom is priceless.
    Where might I learn more?

  7. 7 odżywki April 26, 2014 at 3:17 pm

    Great delivery. Sound odżywki points. Maintain the amazing work.

    This information odżywki is invaluable. How might I get more information?

  8. 8 23321 April 27, 2014 at 4:41 am

    Great delivery. Sound 23321 discussions. Maintain the amazing work.

    This valuable info 15450 is invaluable. How may I garner more information?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: