JAVA SCRIPT CODE TO KEEP THE SCROLLBAR AT BOTTOM

HTML
====
<div id=”mainParentDiv” style=”padding-left:2.4em;display:block;overflow-y: auto;height:500;width: 800px;”>
    <div id=’serverLogsParent’ width=”97%” border=”0″>
        <div id=’serverLogs’ width=”97%” border=”0″></div>
        <div id=”progressDiv” align=”bottom” >
        <img align=”bottom” alt=”Fetching Logs” src=”${pageContext.request.contextPath}/images/progress.gif”/>
        </div>
    </div>
</div>

JAVA SCRIPT
==========
<sctipt>
scroll_to($(‘#mainParentDiv’), $(“#progressDiv”));

function scroll_to(base, target){
        base.animate({
        scrollTop: $(“#serverLogs”).height()
         },100);
};
</script>

Advertisements

About rajkirpal

i am a software engineer. and i have decent knowledge about java technologies like ANDROID, Servlet, Jsp, Struts, Hibernet, Spring, J2ME, Java Script, Ajax, JQuery, CSS. Further i am Preparing Easy understandable materials/documents upon the same java technologies and developing project in core java , advanced java and j2me , ANDROID as per the requirements Also designing the web sites and logos Thank You.
This entry was posted in JavaScript / CSS. Bookmark the permalink.

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