[Javascript] Dynamically Highlight and Scroll to Elements

Troy III Ajnej trojani2000 at hotmail.com
Sun Oct 3 17:01:50 CDT 2004


To distinguish? Why don't you try select that portion. It will distinguish 
conventionaly and you will save yourself from reloading the page, or what 
other ideas you might have. Check for range.select command information on 
the web. You will find it very usefull, as with selected text you can even 
re-edit the content dynamicaly.


>From: tsterlin at email.arizona.edu
>Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
>To: javascript at LaTech.edu
>Subject: [Javascript] Dynamically Highlight and Scroll to Elements
>Date: Thu, 30 Sep 2004 20:13:04 -0700
>
>Does anyone have any suggestions for the following functionality?
>I have an HTML page that looks something like this:
>
><html>
>   <img src="A_Picture.jpg" usemap="This_Map">
>   <MAP NAME="This_Map">
>     <area shape="RECT" coords="26,94,112,188" href="#Item1">
>     <area shape="RECT" coords="157,343,238,412" href="#Item2">
>                               .
>                               .
>                               .(con'd)
>   </MAP>
>
>   <table style="width:100%;">
>     <thead>
>       <tr>
>         <td>
>           <a name="Item1">First Item</a>
>         </td>
>       </tr>
>       <tr>
>         <td>
>           <a name="Item2">Second Item</a>
>         </td>
>       </tr>
>                         .
>                         .
>                         .(con'd)
>     </thead>
>   </table>
></html>
>
>
>The mapping functionality works great; by clicking on the "hotspots" 
>located on
>the graphic, the associated item within the table is scrolled to the top of 
>the
>page.  However, if the user clicks on a hotspot associated with an item 
>located
>toward the beginning or the end of the page, the page scrolls
>as far as it can, but the pertinent item may still appear in the middle of 
>the
>page.  What other method can I use to distinguish the selected items within 
>the
>table?  I would ideally like to highlight the selected item's text within 
>the
>table while simultaneously mapping to it.  Does that require that I 
>dynamically
>reconstruct the page with different background/text color attributes for 
>that
>item, and if so, how do I correspond the scroll location with that new 
>page?
>
>Any suggestions on that method or another text distinguishing method would 
>be
>greatly appreciated.
>
>Tracy.
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail




More information about the Javascript mailing list