Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8377951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:48:18+00:00 2026-06-09T15:48:18+00:00

I tried looking for this answer and saw questions close to it but unable

  • 0

I tried looking for this answer and saw questions close to it but unable to get a resolution to my problem @ HTML table headers always visible at top of window when viewing a large table.

Basically we have inherited a XSL page which has 2 HTML tables and when you hover over an row on the main table that has a value “yes” it shows a hidden 2nd table relating to that row on the right while if “no” it doesnt show anything. However if you have a lot of results being shown through the XSL, when you scroll down you will be unable to see the table.

I am just wondering if there is a way to force the 1 right hidden table to stay at the top of the screen everytime you hover over value yes even if it means to have the XSL result set to have a scroll bar instead?

Hope i have made myself clear, please see an extract of my code that im having trouble with.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>

<script>
function showme(show)
{
  <xsl:for-each select="root/Action">document.getElementById('<xsl:value-of select="@Type"/>').style.display='none';
  </xsl:for-each>
  document.getElementById('summary').style.display='none';
  document.getElementById(show).style.display='inline';
}
</script>

<xsl:for-each select="root/Action">
<span style="display:none">
 <xsl:attribute name="id"><xsl:value-of select="@Type"/></xsl:attribute>
 <table class="lgreenback"><tr class="small"><td class="green">Details for: <b><xsl:value-of select="@Type"/> Actions:</b> &#160; <a onmouseover="style.cursor='hand'" onclick="showme('summary')">&lt;&lt; Back</a></td></tr></table><br/>
 <table cellspacing="0" cellpadding="2" class="bdrnw">
 <tr class="small">
   <td class="lgheadercell">Date:</td>
   <td class="lgheadercell">&#160;</td>
   <td class="lgheadercell">Time:</td>
   <td class="lgheadercell">&#160;</td>
   <td class="lgheadercell">Done By:</td>
   <td class="lgheadercell">&#160;</td>
   <td class="lgheadercell">B&amp;S Ref:</td>
   <td class="lgheadercell">&#160;</td>
    <td class="lgheadercell">Assocs:</td>
 </tr>
 <xsl:for-each select="Case">
   <tr class="smallerstill">

   <xsl:choose>
   <xsl:when test="count(Linked) > 0">
     <xsl:attribute name="onmouseover">style.background='#f6f6f6', style.cursor='hand', document.getElementById('<xsl:value-of select="@id"/>').style.display='inline'</xsl:attribute>
     <xsl:attribute name="onmouseout">style.background='#ffffff', document.getElementById('<xsl:value-of select="@id"/>').style.display='none'</xsl:attribute>
   </xsl:when>
   <xsl:otherwise>
     <xsl:attribute name="onmouseover">style.background='#f6f6f6', style.cursor='hand'</xsl:attribute>
     <xsl:attribute name="onmouseout">style.background='#ffffff'</xsl:attribute>
   </xsl:otherwise>
   </xsl:choose>

     <td><xsl:value-of select="Date"/></td>
     <td></td>
     <td><xsl:value-of select="Time"/></td>
     <td></td>
     <td><xsl:value-of select="Realname"/></td>
     <td></td>
     <td><xsl:value-of select="substring(Client,1,3)" />-<xsl:value-of select="substring(Client,4,1)" />&#160;<xsl:value-of select="Ref"/></td>
     <td></td>
     <td align="center">
       <xsl:choose>
     <xsl:when test="count(Linked) > 0">Yes</xsl:when>
     <xsl:otherwise>No</xsl:otherwise>
   </xsl:choose>
 </td>
   </tr>
 </xsl:for-each>
</table>
</span>
</xsl:for-each>


</td><td valign="top" align="left">

<img src="../images/spacer.gif" height="41" width="120"/>
<xsl:for-each select="/root/Action/Case[count(Linked) > 0]">
  <span style="display:none">
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<table cellspacing="0" cellpadding="2" class="bdrnw">
<tr class="small"><td class="lgheadercell">Assocs:</td></tr>
  <xsl:for-each select="Linked">
  <tr class="smallerstill"><td><xsl:value-of select="substring(@cl,1,3)" />-<xsl:value-of select="substring(@cl,4,1)" />&#160;<xsl:value-of select="@nm"/></td></tr>
  </xsl:for-each>
</table>
</span>

</xsl:for-each>

</td></tr></table>

</html>
</xsl:template>
</xsl:stylesheet>

Let me know if you need anything else.

Thanks,
Kevin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:48:20+00:00Added an answer on June 9, 2026 at 3:48 pm

    Use the CSS position:fixed property on the right-hand table, or a <div> around it.

    CSS Example

    #some-element {
      position: fixed;
      right: 0;
      top: 0%;
    }
    

    References

    1. http://www.w3.org/Style/Examples/007/menus.en.html (Perfect example for you!)
    2. http://www.w3.org/wiki/CSS_absolute_and_fixed_positioning
    3. http://davidwalsh.name/css-fixed-position
    4. http://caniuse.com/css-fixed
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried looking this up on here but couldnt find a proper answer. I
I have tried looking for an answer to this on other threads, but so
This is probably a beginner question, but I've already tried looking for an answer
I've tried looking for the answer, and read many threads on this site, but
I have tried looking around for an answer to this, but I have been
I've tried to find a way to do this, but without success. I'm looking
I have tried looking for answer to this since three days back. It is
I've tried looking at the Microsoft site and Googling this but nobody seems to
I've tried looking to see if this is possible, but I can't find my
I tried searching for this answer online but I haven't found any luck. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.