CJ

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

  • Past Post

  • Vistor Locations

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 = ” “;

}
}

Advertisements

8 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
    toplinedist01@yahoo.com

  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 …

    <![CDATA[

    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 = '';

    }
    };

    ]]>

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 )

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

 
%d bloggers like this: