Good morning,
I am having trouble with the following code
<html>
<head>
<title>highlight date</title>
<style>
.row {
background-color: Yellow;
color:blue;
}
</style>
<script type="text/javascript">
</script>
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<script language="javascript">
var currentTime = new Date();
var day = currentTime.getDate();
var month = currentTime.getMonth() + 1;
var year = currentTime.getFullYear();
var review = day + "/" + month + "/" + year;
</script>
<script language="javascript">
$(document).ready(function() {
$('#names td:contains(xxxx)').parent().addClass('row');
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table id="names">
<tbody>
<tr>
<td>1</td>
<td>review</td>
</tr>
<tr>
<td>2</td>
<td>Satheesh</td>
</tr>
<tr>
<td>3</td>
<td>08/10/2010</td>
</tr>
<tr>
<td>4</td>
<td>11/10/2010</td>
</tr>
<tr>
<td>5</td>
<td>xyz</td>
</tr>
</tbody>
</table>
</div>
</form>
<h4>It was
<script type="text/javascript">document.write(review)</script></h4>
</body>
</html>
I get get it to highlight a set string, but for some reason when ever i try to declare the variable "review" as what i want to search for and highlight, all it seems to find is the word review. can anyone help me on this at all please? its starting to do my head in.
Thankyou