Thursday, 6 February 2014

Adding Comments in WCM

WCM ADD Comments
----------------
MENU_Comments structure
-----------------------
// Header
<table><tbody><tr>
<td>___________________________________________________</td>

</td></tr>


// Design
<tr><td><br><br>
<b>Comments:<b><br>
<br>[Element context="autofill" type="content" key="Comment"]
<br>Commented By:[Property context="autofill" type="content" field="creator"]
<br>------------------------------------<br>
</td><td>
</td></tr>


// Footer
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
            function checkdata() {


var sapath =$("input#paths").val();
var ctitle="&ctitle=" +'[Property context="current" type="content" field="title"]';
var remove = "/wps/wcm/myconnect/Dark+Theme+Library";
sapath=sapath.replace(remove,"");

var sa='[Property context="current" type="content" field="title"]';
var sec_remove=sa;
sapath=sapath.replace(sec_remove,"");


var link="/wps/wcm/jsp/html/ndtvcomment.jsp?contenttitle="+sapath+ctitle;

var frm = document.getElementById("frm_comment");
                frm.action=link;

            }
        </script><tr><td>
<br>ADD YOUR COMMENT<br>
<form name="contact" action="" method="post" id="frm_comment" onsubmit="checkdata()">  
<textarea rows="2" cols="20" name="Comment" id="comment_field"></textarea>
<input type="submit" name="AddComment" id="commentbtn" value="Add Comment">
</form></td></tr>
</tbody></table>
<input type="text" id="paths" value='[URLCmpnt context="current" type="content" mode="standalone"]' style="display:none;"></input>


// No Result Design
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
            function checkdata() {


var sapath =$("input#paths").val();
var ctitle="&ctitle=" +'[Property context="current" type="content" field="title"]';
var remove = "/wps/wcm/myconnect/Dark+Theme+Library";
sapath=sapath.replace(remove,"");

var sa='[Property context="current" type="content" field="title"]';
var sec_remove=sa;
sapath=sapath.replace(sec_remove,"");


var link="/wps/wcm/jsp/html/ndtvcomment.jsp?contenttitle="+sapath+ctitle;

var frm = document.getElementById("frm_comment");
                frm.action=link;

            }
        </script>

<table><tbody><tr>
<td>___________________________________________________
<br>ADD YOUR COMMENT<br>

<form name="contact" action="" method="post" id="frm_comment" onsubmit="checkdata()">  
<textarea rows="2" cols="20" name="Comment" id="comment_field"></textarea>
<input type="submit" name="AddComment" id="commentbtn" value="Add Comment">
</form></td></tr>
</tbody></table>
<input type="text" id="paths" value='[URLCmpnt context="current" type="content" mode="standalone"]' style="display:none;"></input>

1 comment:

  1. JSPG0036E: Failed to find resource /jsp/html/ndtvcomment.jsp

    It is showing me this error. what should I do?

    ReplyDelete