Forum Moderators: open

Message Too Old, No Replies

Mouseover and only displaying a summary

         

scoobydoo987

2:45 pm on Aug 10, 2005 (gmt 0)

10+ Year Member



When a user mouses over an ID I want a popup to appear with only a summary of text but when they click on the ID link it takes them to the detail page with all the information. The ID's are in a ASP.NET datagrid so the URL to go to is easily done by setting the properties but I need to write Javascript to handle the mouseover to display only a summary.

I have no idea where to start. If anyone knows of an example I can look at or has any ideas I would be greatly appreciative.

nigassma

4:47 pm on Aug 10, 2005 (gmt 0)

10+ Year Member



If the popup you are looking for is not a new window, you can do this effect with CSS.

garann

6:57 pm on Aug 10, 2005 (gmt 0)

10+ Year Member



As nigassma says, you can do it with CSS alone. The only problem with that is that your new "window" (really just a div or other element) would need to be inside the anchor tag. (Unless I'm missing something...)

I'd recommend using some very simple Javascript, to allow you to position a new div or paragraph or whatever wherever you'd like it. It might look like this:


<script type="text/javascript">
function summary(summaryID,show) {
var obj = document.getElementById("summaryID");
if (show) obj.style.display = "block;
else obj.style.display = "none";
}
</script>
...
<table ...>
<tr>
<td>
<a href="#" onmouseover="summary('summary514',true);" onmouseout="summary('summary514',false);">514</a>
<p id="summary514">Short summary description goes here.</p>
</td>
...
</tr>
...
</table>

scoobydoo987

9:09 pm on Aug 10, 2005 (gmt 0)

10+ Year Member



thanks.