rss search

Hyper link Table Tr Using JavaScript

line
<script type="text/javascript">
function mouseOver(rowID,strClass,type)
{
            //alert(rowID + ' | ' + strClass + ' | ' + type);
            if (type == 1)
            {
                        document.getElementById('right' + rowID).className= strClass;
            }
            else if (type == 2)
            {
                        document.getElementById('left' + rowID).className= strClass;
            }
}
function mouseOut(rowID,strClass,type)
{
            //alert(rowID + ' | ' + strClass + ' | ' + type);
            if (type == 1)
            {
                        document.getElementById('right' + rowID).className= strClass;
            }
            else if (type == 2)
            {
                        document.getElementById('left' + rowID).className= strClass;
            }
}
</script>

<%
int rowID = 0;

while (resultSet.next())
{
            ------
            -------

            rowID += 1;
%>
            <tr>
                        <td> </td>
                        <td>
                                    <a href="#" class="link" id="left<%=rowID%>" onmouseover="mouseOver(<%=rowID%>,'link2',1)" onmouseout="mouseOut(<%=rowID%>,'link',1)">Left link</a>
                        </td>
                        <td> </td>
                        <td>
                                    <a href="#" class="link" id="right<%=rowID%>" onmouseover="mouseOver(<%=rowID%>,'link2',2)" onmouseout="mouseOut(<%=rowID%>,'link',2)">Right link</a>
                        </td>
            </tr>
<%
}
%>

This Post is shared by Aldrin Pereira @ aldrin.pereira@gmail.com

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter


Leave a Reply

You must be logged in to post a comment.

Devguru.in is Stephen Fry proof thanks to caching by WP Super Cache