Latest Snippet
Make entire table rows clickable
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
<title>Full Row Select</title>
<script type="text/javascript">
function ChangeColor(tableRow, highLight)
{
if (highLight)
{
tableRow.style.backgroundColor = '#dcfac9';
}
else
{
tableRow.style.backgroundColor = 'white';
}
}
function DoNav(theUrl)
{
document.location.href = theUrl;
}
</script>
</head>
<body>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr onmouseover="ChangeColor(this, true);"
onmouseout="ChangeColor(this, false);"
onclick="DoNav('http://www.google.com/');">
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr onmouseover="ChangeColor(this, true);"
onmouseout="ChangeColor(this, false);"
onclick="DoNav('http://www.microsoft.com/');">
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
<tr onmouseover="ChangeColor(this, true);"
onmouseout="ChangeColor(this, false);"
onclick="DoNav('http://www.binarynation.com/');">
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</table>
</body>
</html> |
posted 24 March 2008 @ 20:02 by stephen » 0 Comments
Previous Snippet...
Remove HTML from a string
Dim strippedString As String = Regex.Replace(htmlString, "<(.|\n)*?>", string.Empty)

