DEVCON 2026    |    2-5 November 2026 – QEII Centre – London, UK    |    Register now! 

Blogs

Make your Page Comments input forms sliding

Wan Gavin
Wan Gavin
読了時間: 1分未満

Many of our portlets have the ability for users to leave comments and replies such as Wiki, Page Comments, Blogs, Journal Content, etc. When users hit the Reply button, a simple text box appears. This new feature will add a sliding effect when users hit the Reply button. The simple text box will slide into view instead of just appearing.

ok, let do it.

we need modify the portal-web/docroot/html/taglib/ui/discussion/page.jsp

Firstly, modify the show/hide form function

Before adding the slide feature the code is like this:

document.getElementById(rowId).style.display = "";

document.getElementById(rowId).style.display = 'none';

 

Change it to:

jQuery('#'+rowId).slideDown("slow");

jQuery('#'+rowId).slideUp("slow");

 

Secondly,we hava to chang the

<tr id="<%= namespace %>postReplyForm<%= i %>" style="display: none;">

to

<div id="<%= namespace %>postReplyForm<%= i %>" style="display: none;">

This will make sure the code works in IE.

Now your reply forms can have the sliding feature.

 

 

 

ページコメント

Related Assets...

結果が見つかりません。

More Blog Entries...