The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

  • Advertisements

Remove Reply Text in SharePoint Discussion Board

Posted by Clayton James on December 9, 2010

Including the reply text in a SharePoint 2007 discussion board I think makes viewing and participating in discussions more clearer.

The following JavaScript will remove the reply (previous post) text.

var d = document.getElementsByTagName(“textarea”);
for( var i=0; i < d.length; ++i){
if( d[i].id.indexOf(‘TextField’) != 0 ){

d[i].value = ” “;



9 Responses to “Remove Reply Text in SharePoint Discussion Board”

  1. DHawk said

    If anyone actually tries this, you have to replace the double and single quotes when you paste this into SP Designer. In their current form they are a unicode character and that won’t work in javascript.

  2. woenmag said

    This is an outstanding blog! I am so impressed! I can help you to promote it, just let me know if you want it.

  3. owesAdelo said

    May seem like those guys have got fantastic low selling prices, although this “Buy Gadgets Online” appears to be a tiny bit not professional. What you think? Did some of you decide to buy there? Or perhaps another alternatives?

  4. I believe this code will remove the text from body field but it can still be viewed if user clicks on View Source.

  5. hoahCoennyCuh said

    ugg boots, drugs whatever send me i order all – ok popinjay ? here i my adress details

  6. Dan Barnett said

    Ok – I’m new to the behind the scenes workings of SP. That being said……….

    Exactly where would you insert this bit of code?

  7. joanne said

    what do you mean when you need to replace double n single quotes? right now this script doesnt work for me , i insert it in http://servername/sitename/Lists/listname/NewForm.aspx?ContentTypeId=0x0107/newform.asxp

    the script i use is this …


    var d = document.getElementsByTagName(‘ctl00_m_g_7e650461_88d7_4515_b61e_579495109b1d_ctl00_ctl05_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField’);
    for( var i=0; i < d.length; ++i){
    if( d[i].id.indexOf('ctl00$m$g_7e650461_88d7_4515_b61e_579495109b1d$ctl00$ctl05$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$TextField') != 0 ){

    d[i].value = '';



  8. Best10 said

    After I initially commented I appear to have clicked the -Notify me when new comments are added- checkbox and from now on each time a comment is added I receive 4 emails with the same comment. There has to be a means you are able to remove me from that service? Cheers!Best10

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: