|
 |
asp_databases thread: RE: Problem similar to change bgcolor postings
Message #1 by Aftab Ahmad <aftab.ahmad@k...> on Thu, 2 May 2002 09:12:07 +0200
|
|
Put the below logic at ur page. Hope it will help.
<html>
<head>
<script LANGUAGE="JavaScript">
<!--
function TR_OnMouseOver(srcEle) {
TempColor = srcEle.style.backgroundColor;
srcEle.style.backgroundColor = "teal";
}
function TR_OnMouseOut(srcEle) {
srcEle.style.backgroundColor = TempColor;
}
-->
</script>
</HEAD>
<body>
<table width="498" border="0" cellspacing="0"
cellpadding="0">
<tr onmouseover="TR_OnMouseOver(this);"
onmouseout="TR_OnMouseOut(this);">
<td width="80">17</A></td>
<td width="115">1/3/00 14:</A></td>
<td width="101">AFA</td>
<td width="81">SUL</td>
<td width="121"></td>
</tr>
<tr onmouseover="TR_OnMouseOver(this);"
onmouseout="TR_OnMouseOut(this);">
<td width="80">18</A></td>
<td width="115">12/8/00 15</A></td>
<td width="101">AFA</td>
<td width="81">SUL</td>
<td width="121"></td>
</tr>
<tr onmouseover="TR_OnMouseOver(this);"
onmouseout="TR_OnMouseOut(this);">
<td width="80">19</A></td>
<td width="115">4/11/00 15</A></td>
<td width="101">AFA</td>
<td width="81">SUL</td>
<td width="121"></td>
</tr>
</table>
</BODY>
</HTML>
Aftab Ahmad
-----Original Message-----
From: Azinger, Richard [mailto:richard.azinger@p...]
Sent: 1. mai 2002 16:24
To: ASP Databases
Subject: [asp_databases] Problem similar to change bgcolor postings
List,
I've got a problem similar to the resent postings of "Change the bgcolor of
a row dynamically". The difference is that I want the background of a row to
change color "onMouseOver" to grey and change all other rows to white. I've
tried to adapt the code from the other postings but am getting a "Object
expected" error.
Thanks for the help in advance,
Rich Azinger
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
<html>
<head>
<title>color change test</title>
<script LANGUAGE="JavaScript">
<!-- Begin
function show_text(whichdiv){
var i;
for(i=1;i<=4;i++){
if (i = whichdiv) {
eval("document.all.div"+i=".bgColor")='#EFEFEF';}
else {
eval("document.all.div"+i=".bgColor")='#FFFFFF'}
}
}
// End -->
</script>
</head>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" link="#000080"
vlink="#800080" alink="#008080">
<div align="center"><center>
<p> </p>
<table border="0" width="95%" cellpadding="0" cellspacing="0">
<tr>
<td id="div1" onmouseover="show_text(1)" style="cursor:pointer;
cursor:hand" width="40%">
<blockquote>
<p><font size="2" face="Verdana"><u><b>Row 1</b></u></font></p>
</blockquote>
</td>
<td width="60%" rowspan="4" valign="top" bgcolor="#EFEFEF"> <font
size="2" face="Verdana"><span id="div0">Place
your cursor over the links on the left for a description to appear
here.<br>
</span></font></td>
</tr>
<tr>
<td id="div2" onmouseover="show_text(2)" style="cursor:pointer;
cursor:hand" width="40%">
<blockquote>
<p><u><font size="2" face="Verdana"><u><b>Row
2</b></u></font></u></p>
</blockquote>
</td>
</tr>
<tr>
<td id="div3" onmouseover="show_text(3)" style="cursor:pointer;
cursor:hand" width="40%" height="14">
<blockquote>
<p><u><font size="2" face="Verdana"><u><b>Row
3</b></u></font></u></p>
</blockquote>
</td>
</tr>
<tr>
<td id="div4" onmouseover="show_text(4)" style="cursor:pointer;
cursor:hand" width="40%">
<blockquote>
<p><u><font size="2" face="Verdana"><u><b>Row
4</b></u></font></u></p>
</blockquote>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
Message #2 by "Huber, Mike" <michael.huber@p...> on Wed, 1 May 2002 11:35:29 -0500
|
|
I found something possibly similair to what you are looking for and also a
site that contains alot of other neat stuff
www.dynamicdrive.com
Although, alot of it is dhtml.
-----Original Message-----
From: Azinger, Richard [mailto:richard.azinger@p...]
Sent: Wednesday, May 01, 2002 9:24 AM
To: ASP Databases
Subject: [asp_databases] Problem similar to change bgcolor postings
List,
I've got a problem similar to the resent postings of "Change the bgcolor of
a row dynamically". The difference is that I want the background of a row to
change color "onMouseOver" to grey and change all other rows to white. I've
tried to adapt the code from the other postings but am getting a "Object
expected" error.
Thanks for the help in advance,
Rich Azinger
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
<html>
<head>
<title>color change test</title>
<script LANGUAGE="JavaScript">
<!-- Begin
function show_text(whichdiv){
var i;
for(i=1;i<=4;i++){
if (i = whichdiv) {
eval("document.all.div"+i=".bgColor")='#EFEFEF';}
else {
eval("document.all.div"+i=".bgColor")='#FFFFFF'}
}
}
// End -->
</script>
</head>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" link="#000080"
vlink="#800080" alink="#008080">
<div align="center"><center>
<p> </p>
<table border="0" width="95%" cellpadding="0" cellspacing="0">
<tr>
<td id="div1" onmouseover="show_text(1)" style="cursor:pointer;
cursor:hand" width="40%">
<blockquote>
<p><font size="2" face="Verdana"><u><b>Row 1</b></u></font></p>
</blockquote>
</td>
<td width="60%" rowspan="4" valign="top" bgcolor="#EFEFEF"> <font
size="2" face="Verdana"><span id="div0">Place
your cursor over the links on the left for a description to appear
here.<br>
</span></font></td>
</tr>
<tr>
<td id="div2" onmouseover="show_text(2)" style="cursor:pointer;
cursor:hand" width="40%">
<blockquote>
<p><u><font size="2" face="Verdana"><u><b>Row
2</b></u></font></u></p>
</blockquote>
</td>
</tr>
<tr>
<td id="div3" onmouseover="show_text(3)" style="cursor:pointer;
cursor:hand" width="40%" height="14">
<blockquote>
<p><u><font size="2" face="Verdana"><u><b>Row
3</b></u></font></u></p>
</blockquote>
</td>
</tr>
<tr>
<td id="div4" onmouseover="show_text(4)" style="cursor:pointer;
cursor:hand" width="40%">
<blockquote>
<p><u><font size="2" face="Verdana"><u><b>Row
4</b></u></font></u></p>
</blockquote>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
Message #3 by "Azinger, Richard" <richard.azinger@p...> on Wed, 1 May 2002 09:24:10 -0500
|
|
List,
I've got a problem similar to the resent postings of "Change the bgcolor of
a row dynamically". The difference is that I want the background of a row to
change color "onMouseOver" to grey and change all other rows to white. I've
tried to adapt the code from the other postings but am getting a "Object
expected" error.
Thanks for the help in advance,
Rich Azinger
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
<html>
<head>
<title>color change test</title>
<script LANGUAGE="JavaScript">
<!-- Begin
function show_text(whichdiv){
var i;
for(i=1;i<=4;i++){
if (i = whichdiv) {
eval("document.all.div"+i=".bgColor")='#EFEFEF';}
else {
eval("document.all.div"+i=".bgColor")='#FFFFFF'}
}
}
// End -->
</script>
</head>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" link="#000080"
vlink="#800080" alink="#008080">
<div align="center"><center>
<p> </p>
<table border="0" width="95%" cellpadding="0" cellspacing="0">
<tr>
<td id="div1" onmouseover="show_text(1)" style="cursor:pointer;
cursor:hand" width="40%">
<blockquote>
<p><font size="2" face="Verdana"><u><b>Row 1</b></u></font></p>
</blockquote>
</td>
<td width="60%" rowspan="4" valign="top" bgcolor="#EFEFEF"> <font
size="2" face="Verdana"><span id="div0">Place
your cursor over the links on the left for a description to appear
here.<br>
</span></font></td>
</tr>
<tr>
<td id="div2" onmouseover="show_text(2)" style="cursor:pointer;
cursor:hand" width="40%">
<blockquote>
<p><u><font size="2" face="Verdana"><u><b>Row
2</b></u></font></u></p>
</blockquote>
</td>
</tr>
<tr>
<td id="div3" onmouseover="show_text(3)" style="cursor:pointer;
cursor:hand" width="40%" height="14">
<blockquote>
<p><u><font size="2" face="Verdana"><u><b>Row
3</b></u></font></u></p>
</blockquote>
</td>
</tr>
<tr>
<td id="div4" onmouseover="show_text(4)" style="cursor:pointer;
cursor:hand" width="40%">
<blockquote>
<p><u><font size="2" face="Verdana"><u><b>Row
4</b></u></font></u></p>
</blockquote>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
|
|
 |