Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to get the row number from a query record set?

    I have a table that is generated dynamically using CF. I also have a function that is able to highlight the selected row, but what I don't understand is how this function knows which row it is at. What I would like to be able to do is, click on the selected row, get the hidden value of that selected row, then pass that value to a CF action page using the a href.location.

    Right now I hard coded the getRow function to point to a value, but ideally, I want that value to be generated dynamically.

    Here are the functions:
    //This function gets passed a row & a recordID
    function selectRow2 (row, recordName) {
    selectedRow = row;
    selectedName = recordName;
    selectedRow.style.background = selectedColor;
    }

    //This function gets passed a row
    function getRow(row) {
    var x;
    var columnOne; // just to save typing later...
    columnOne = document.add.UserID;

    for (var i=0; i<=columnOne.length; i++) {
    x = columnOne[4].value;
    // do something with it

    }
    alert(x);
    }


    Here is the table:
    <table bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0" width="100%" id="project1" class="scrollTable">
    <thead class="fixedHeader3" id="fixedHeader3">
    <tr>
    <!---<th id="smallFormText" width="5%"><a href="users.cfm?sort=UserID">UserID</a></th>--->
    <th id="smallFormText" width="5%"><a href="users.cfm?sort=Last_Name">LName</a></th>
    <th id="smallFormText" width="5%"><a href="users.cfm?sort=First_Name">FName</a></th>
    <th id="smallFormText" width="2%"><a href="users.cfm?sort=Phone_Number">Phone</a></th>

    </tr>
    </thead>
    <tbody class="tableBody">

    <cfoutput query="existingUsers" startrow="1">
    <cfset rowNum = #currentrow# MOD 2>
    <tr bgcolor="FFFFFF" ONCLICK="selectRow2(this, #UserID#);" onmouseover="overRow(this);" onmouseout="outRow(this);">
    <!--<td>#CurrentRow#</td>-->
    <!---<td>#UserID#</td>--->
    <td>#Last_Name#</td>
    <td>#First_Name#<input type="hidden" name="First_Name" value="#First_Name#" /></td>
    <td>#Phone_Number#<input type="hidden" name="UserID" value="#UserID#" />
    </td>
    </tr>
    </cfoutput>
    </tbody>
    </table>

    Here is the input calling the function.
    <input type="image" src="images/down.gif" alt="Add User" onclick="getRow(this);" /><br /><span id="add">ADD</span>

    I appreciate any help,

    Thanks in advance.
    Last edited by mondomon; 11-13-2006 at 09:15 PM.

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts
    create a form:

    <form name=myform action="pagebeingsubmittedto.htm" method="get">
    <input type="hidden" name="First_Name" value="#First_Name#" />
    <input type="hidden" name="Last_Name" value="#Last_Name#" />
    </form>

    then in your table use this:

    <td>#First_Name#<input type="hidden" id="First_Name" value="#First_Name#" /></td>
    <td>#Last_Name#<input type="hidden" id="Last_Name" value="#Last_Name#" /></td>

    in the function set the hidden input in the form to the value of the input with the specified id.

    document.myform.First_Name.value=document.getElementById("First_Name").value;
    document.myform.Last_Name.value=document.getElementById("Last_Name").value;

    of course you would do this for all the inputs.....

    then submit the form.

    document.myform.submit()

    that will pass the values of all the hidden inputs in the form to the location/address bar like this:
    Code:
    www.yoursite.com/pagebeingsubmittedto.htm?First_Name=thevalue&Last_Name=value
    you then would only need a script in the submit page to strip out the values from the querystring.

    if you need such a script look at this thread:
    How do I do this ?
    I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.

  • #3
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank You for your help,

    but I do not want to pass all of the hidden input values, only the selected one.

    In this function it is doing exactly the samething as you said if I change the [4] to [i] it will loop through all of the values. What I want is to be able to loop through all the values but stop at the selected value (in this case columnOne[4].value). However, since I will not know what row the user clicks on, the function must determine that dynamically within the array.


    Code:
    //This function gets passed a row
    function getRow(row) {
    var x;
    var columnOne; // just to save typing later...
    columnOne = document.add.UserID;
    
    for (var i=0; i<=columnOne.length; i++) {
    x = columnOne[4].value;
    // do something with it
    
    }
    alert(x);
    }
    BTW, my form tag looks like this:
    <form name="add" action="new_usersAddAction.cfm" method="post">

    Thanks again, and sorry for any confusion.

  • #4
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts
    still not sure if this is what you want or not, but maybe it'll point you inthe right direction:

    Code:
    <table>
    <tr>
    <td id=Td >#First_Name#<input type="hidden" name="First_Name" value="First_Name value" ></td>
    <td id=Td >#Last_Name#<input type="hidden" name="First_Name" value="Last_Name value" ></td>
    <td id=Td >#userID#<input type="hidden" name="userID" value="userID value" ></td>
    </tr></table>
    
    <script type=text/javascript>
    var storedValue="";
    </script>
    
    <script type=text/javascript for=Td event=onclick()>
    input=this.getElementsByTagName("input");
    storedValue=input[0].value
    </script>

    or are you just trying to grab one specific value, i.e. just the userID?
    I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.

  • #5
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well the table is a list of User's First and Last Names and Phone Number, with the hidden value being the UserID.

    When a user clicks on a row of the table, I want to be able to get just that row's UserID.

    Once I have that, I can pass it as a variable in the url to a Coldfusion action page.

    Is there a way to get just the rowIndex of a table?

  • #6
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well the table is a list of User's First and Last Names and Phone Number, with the hidden value being the UserID.

    When a user clicks on a row of the table, I want to be able to get just that row's UserID.

    Once I have that, I can pass it as a variable in the url to a Coldfusion action page.

    Is there a way to get just the rowIndex of a table?

    Thanks In advance.

  • #7
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts
    Code:
    <table>
    
    <TR id=Tr>
    <td  >#First_Name#<input type="hidden" name="First_Name" value="First_Name value" ></td>
    <td  >#Last_Name#<input type="hidden" name="First_Name" value="Last_Name value" ></td>
    <td  >#userID#<input type="hidden" name="userID" value="userID value" ></td>
    </TR>
    <TR id=Tr>
    <td  >#First_Name#<input type="hidden" name="First_Name" value="First_Name value2" ></td>
    <td  >#Last_Name#<input type="hidden" name="First_Name" value="Last_Name value2" ></td>
    <td  >#userID#<input type="hidden" name="userID" value="userID value2" ></td>
    </TR>
    <TR id=Tr>
    <td  >#First_Name#<input type="hidden" name="First_Name" value="First_Name value3" ></td>
    <td  >#Last_Name#<input type="hidden" name="First_Name" value="Last_Name value3" ></td>
    <td  >#userID#<input type="hidden" name="userID" value="userID value3" ></td>
    </TR>
    
    </table>
    
    <script type=text/javascript>
    var storedValue="";
    </script>
    
    <script type=text/javascript for=Tr event=onmouseover()>
    overRow(this);
    </script>
    
    <script type=text/javascript for=Tr event=onmouseout()>
    ovutRow(this);
    </script>
    
    <script type=text/javascript for=Tr event=onclick()>
    selectRow2(this, #UserID#);
    input=this.getElementsByTagName("input");
    alert(input.length);
    i='0';
    while(i<input.length){
    if(input[i].name=="userID"){storedValue=input[i].value;break;}
    i++;}
    
    //alert(storedValue);
    //do what you want with the userID hidden value (storedValue)
    </script>

    the above will do run your highlighting script, then search through the input's within the tr that is clicked for an input named "userID". it will then grab the value of that input and store it to a global variable. you can then submit just that value after that.
    Last edited by brandonH; 11-14-2006 at 09:51 PM.
    I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.

  • #8
    Banned
    Join Date
    Oct 2005
    Location
    I'm in GMT -5
    Posts
    314
    Thanks
    0
    Thanked 1 Time in 1 Post
    mondomon:

    Do not use duplicate ID's. e.g. id="smallFormText" ID's must be unique.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title> Get UserID </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript">
    
    	var isTable = "";
    	var nRows = 0;
    	var nCells = 0;
    	
    	function getUserID(isRow){
    
    		var nUsers = document.getElementsByName('UserID');
    		for (i=1; i<nRows; i++)
    			{
    			 if (isTable.rows[i] == isRow)
    				{
    				 var selectedID = nUsers[i-1].value;
    				}
    			}
    		alert(selectedID);
    	}
    
    	function init(){
    
    		isTable = document.getElementsByTagName('table')[0];
    		nRows = isTable.rows.length;
    		for (i=1; i<nRows; i++)
    			{	 	
    		         isTable.rows[i].onmouseover = function()
    				{
    			 	 this.style.cursor = 'pointer';
    				 nCells = this.cells.length;
    				 for(n=0; n<nCells; n++)
    					{
    				 	 this.cells[n].className = 'tr_hover';
    					}
    				}
    			 isTable.rows[i].onmouseout = function()
    				{
    			 	 for(n=0; n<nCells; n++)	
    					{this.cells[n].className = ""}
    				}
    			}
    		for (i=1; i<nRows; i++)
    			{
    			 isTable.rows[i].onclick = function()
    				{
    				 getUserID(this);
    				}
    			}
    	}
    
    	onload=init;
    
    </script>
    <style type="text/css">
    
    	 body {background-color:#eae3c6;margin-top:65px}
    	 table {border-bottom:1px solid black;border-right:1px solid black}
    	 table th {background-color:#7fffd4;border-left:1px solid black;border-top:1px solid black}
    	 table tr td {background-color:#ffffe0;border-top:1px solid black;border-left:1px solid black} 
    	.tr_hover {background-color:#b0c4de}
    	
    </style>
    </head>
    <body>
          <table align='center' border='0' cellspacing='0' cellpadding='5' width='400'>
             <thead>
                <tr>
                   <th width="33%">
                      First Name
                   </th>
                   <th width="33%">
                      Last Name
                   </th>
                   <th width="33%">
                      Phone
    	       </th>
                </tr>
             </thead>
             <tbody>
                <tr>
                   <td>
                      One
                   </td>
                   <td>
                      Two
                   </td>
                   <td>
                      Three
    		  <input type='hidden' name="UserID" value="User Id 1">
                   </td>
                </tr>
                <tr>
                   <td>
                      Four
                   </td>
                   <td>
                      Five
                   </td>
                   <td>
                      Six
    		  <input type='hidden' name="UserID" value="User Id 2">
                   </td>
                </tr>
                <tr>
                   <td>
                      Seven
                   </td>
                   <td>
                      Eight
                   </td>
                   <td>
                      Nine
    		  <input type='hidden' name="UserID" value="User Id 3">
                   </td>
                </tr>
             </tbody>
          </table>
       </body>
    </html>
    Last edited by Ancora; 11-15-2006 at 02:15 PM.

  • #9
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    brandonH:

    Thank you for your help, unfortunately your script gave me object errors.

    Ancora:

    Thanks very much for the script. I was playing with it and trying to get the mouseover background color to stay on the selected row after being clicked but after hours of trying, I can't figure it out.

    I want to be able to change the color of the selected row because once the user knows which Name they want to pick, they can click on the add button to add them to the selected list.

    Also, how can I get the selectedID into the function being called from the add button?

    I first did this using a select box, but since there are 3 variables it didn't look right.

    Please let me know.

    Thanks
    Last edited by mondomon; 11-15-2006 at 05:24 PM.

  • #10
    Banned
    Join Date
    Oct 2005
    Location
    I'm in GMT -5
    Posts
    314
    Thanks
    0
    Thanked 1 Time in 1 Post
    mondomon:

    I have no idea what you are doing with an "add" button. In the following, I made selectedID a global variable. Now it's available to any function.

    The following also keeps the row highlighted until the table is clicked again, anywhere.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title> Get UserID </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript">
    
    	var isTable = "";
    	var nRows = 0;
    	var nCells = 0;
    	var active = true;
    	var selectedID = "";
    
    	function doSomething(){
    	
    		alert(selectedID);
    	}
    			
    	function getUserID(isRow){
    
    		if (active)
    			{
    			 for (i=1; i<nRows; i++)
    				{
    				 for(n=0; n<nCells; n++)	
    					{
    					 isTable.rows[i].cells[n].className = "";
    					}
    				}
    			 return;
    			}
    		var nUsers = document.getElementsByName('UserID');
    		for (i=1; i<nRows; i++)
    			{
    			 if (isTable.rows[i] == isRow)
    				{
    				 selectedID = nUsers[i-1].value;
    				}
    			}
    		doSomething();
    	}
    
    	function init(){
    
    		isTable = document.getElementsByTagName('table')[0];
    		nRows = isTable.rows.length;
    		for (i=1; i<nRows; i++)
    			{	 	
    		         isTable.rows[i].onmouseover = function()
    				{
    				 if (!active){this.style.cursor = 'default'; return}
    			 	 this.style.cursor = 'pointer';
    				 nCells = this.cells.length;
    				 for(n=0; n<nCells; n++)
    					{
    				 	 this.cells[n].className = 'tr_hover';
    					}
    				}
    			 isTable.rows[i].onmouseout = function()
    				{
    				 if (!active){return}
    			 	 for(n=0; n<nCells; n++)	
    					{
    					 this.cells[n].className = "";
    					}
    				}
    			}
    		for (i=1; i<nRows; i++)
    			{
    			 isTable.rows[i].onclick = function()
    				{
    				 active ? active = false : active = true;
    				 getUserID(this);
    				}
    			}
    	}
    
    	onload=init;
    
    </script>
    <style type="text/css">
    
    	 body {background-color:#eae3c6;margin-top:65px}
    	 table {border-bottom:1px solid black;border-right:1px solid black}
    	 table th {background-color:#7fffd4;border-left:1px solid black;border-top:1px solid black}
    	 table tr td {background-color:#ffffe0;border-top:1px solid black;border-left:1px solid black} 
    	.tr_hover {background-color:#b0c4de}
    	
    </style>
    </head>
    <body>
          <table align='center' border='0' cellspacing='0' cellpadding='5' width='400'>
             <thead>
                <tr>
                   <th width="33%">
                      First Name
                   </th>
                   <th width="33%">
                      Last Name
                   </th>
                   <th width="33%">
                      Phone
    	       </th>
                </tr>
             </thead>
             <tbody>
                <tr>
                   <td>
                      One
                   </td>
                   <td>
                      Two
                   </td>
                   <td>
                      Three
    		  <input type='hidden' name="UserID" value="User Id 1">
                   </td>
                </tr>
                <tr>
                   <td>
                      Four
                   </td>
                   <td>
                      Five
                   </td>
                   <td>
                      Six
    		  <input type='hidden' name="UserID" value="User Id 2">
                   </td>
                </tr>
                <tr>
                   <td>
                      Seven
                   </td>
                   <td>
                      Eight
                   </td>
                   <td>
                      Nine
    		  <input type='hidden' name="UserID" value="User Id 3">
                   </td>
                </tr>
             </tbody>
          </table>
       </body>
    </html>

  • #11
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ancora:

    The behavior of the table that I'm looking for is this

    The user clicks on a table row, the javascript highlights that row one color (#B7F39B highlight green), but the user can still hover over the other rows with another color (#EEFEE6 pale green) without having to click on the table first.

    Another cavet is that only one row can be selected at a time. I was playing with it and I got it to highlight the row when clicked, then after clicking on the table I clicked on another row, but the previous row was still highlighted.
    The previous selected row color should reset when a new row is clicked, but if you hover over the selected row, then it should maintain it's color until another row is clicked.

    If you have ever used Coldfusion's cfgrid in cf flash forms, that is the behavior I'm trying to mimic using javascript.

    Thanks again, this is very helpful.
    Last edited by mondomon; 11-15-2006 at 07:59 PM.

  • #12
    Banned
    Join Date
    Oct 2005
    Location
    I'm in GMT -5
    Posts
    314
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by mondomon View Post
    I was playing with it and I got it to highlight the row when clicked, then after clicking on the table I clicked on another row, but the previous row was still highlighted.
    That's not what happens in my code. You must not be testing it AS IS, but never mind. I've done all I'm willing to do. I'm just not willing to write all the code you need, I'm not willing to keep making changes merely because you failed or refused to completely describe the problem and desired outcome in your initial post, or at least in your initial response to me. It's too much like "placing an order."

    I'm attaching two other examples, that are similiar to what you describe. Instead of highlighting a row onclick, they highlight a clicked cell, but continue to highlight other rows onmouseover. That's all I'm willing to do. Hopefully, you can take it from here.
    Code:
    <HTML>
    <Head>
    <Style type="text/css">
    
    .TR_Hover {background-Color : blue}
    
    .TD_Click {background-Color : red}
    
    .default {background-Color : lightyellow}
    
    </Style>
    
    <Script type="text/javascript">
    
    	var currColor = new Array();
    	var selectedData = new Array();
    	var isTable = "";
    	var nRows = 0;
    
    	function doSomething(){
    
    		selectedData.length = 0;
    		p = 0;
    		nRows = isTable.rows.length;
    		for (i=0; i<nRows; i++)
    			{
    			 nCells = isTable.rows[i].cells.length;
    			 for (n=0; n<nCells; n++)
    				{
    				 if (isTable.rows[i].cells[n].className == "TD_Click")
    				 	{selectedData[p++] = isTable.rows[i].cells[n].innerHTML}
    				}
    			}
    		alert(selectedData);
    	}
    
    	function setClickColor(isCell){
    
    		if (isCell.className == "TD_Click"){isCell.className = "default"}
    		else {isCell.className = "TD_Click"}
    		for (i=0; i<nRows; i++)
    			{
    			 nCells = isTable.rows[i].cells.length;
    			 for (n=0; n<nCells; n++)
    				{if (isTable.rows[i].cells[n] == isCell){currRow=i;currCell=n}}
    			}
    		rowLength = isTable.rows[currRow].cells.length;
    		for (i=0; i<rowLength; i++)
    			{
    			 if (i != currCell)
    			 	{isTable.rows[currRow].cells[i].className = "default"}
    			 currColor[i] = isTable.rows[currRow].cells[i].className;
    			}
    	}
    
    	function init(){
    
    		isTable = document.getElementById('Table1');
    		nRows = isTable.rows.length;
    		for (i=1; i<nRows; i++)
    		{	 	
    		         isTable.rows[i].onmouseover = function(){
    			 this.style.cursor = 'pointer';
    			 nCells = this.cells.length;
    			 for(n=1; n<nCells; n++)
    				{
    				 currColor[n] = this.cells[n].className;
    				 if (currColor[n] != "TD_Click")
    				 	{this.cells[n].className='TR_Hover'}
    				}
    						}		
    			 isTable.rows[i].onmouseout = function(){
    			 for(n=1; n<nCells; n++)	
    				{this.cells[n].className=currColor[n]}
    						}
    		 }
    	}
    
    	window.onload=init;
    
    </Script>
    </Head>
    <Body>
    <Table id='Table1' align='center' bgcolor='lightyellow' border='1' cellspacing='0' cellpadding='5' width='400'>
    <TR>
    <TD width=25%>&nbsp</TD><TD width=25%>C1</TD><TD width=25%>C2</TD><TD width=25%>C3</TD>
    </TR>
    <TR>
    <TD>R1</TD><TD id='c1' onclick="setClickColor(this)">One</TD><TD id='c2' onclick="setClickColor(this)">Two</TD><TD id='c3' onclick="setClickColor(this)">Three</TD>
    </TR>
    <TR>
    <TD>R2</TD><TD id='c4' onclick="setClickColor(this)">Four</TD><TD id='c5' onclick="setClickColor(this)">Five</TD><TD id='c6' onclick="setClickColor(this)">Six</TD>
    </TR>
    <TR>
    <TD>R3</TD><TD id='c7' onclick="setClickColor(this)">Seven</TD><TD id='c8' onclick="setClickColor(this)">Eight</TD><TD id='c9' onclick="setClickColor(this)">Nine</TD>
    </TR>
    </Table>
    <br>
    <center>
    <input type=button value="Do Something" onclick="doSomething()">
    <center>
    </Body>
    </HTML>
    Code:
    <html>
    <head>
    <script type="text/javascript">
    
    	var currColor = [];
    	var isTable = "";
    	var nRows = 0;
    
    	function doSomething(isCell){
    
    		if (isCell.className == "TD_Click")
    			{
    			 cellData = document.getElementById(isCell.id).innerHTML;
    			 alert(cellData);
    			}
    	}
    
    	function setClickColor(isCell){
    
    		if (isCell.className == "TD_Click"){isCell.className = "default"}
    		else {isCell.className = "TD_Click"}
    		for (i=0; i<nRows; i++)
    			{
    			 nCells = isTable.rows[i].cells.length;
    			 for (n=0; n<nCells; n++)
    				{if (isTable.rows[i].cells[n] == isCell){currRow=i;currCell=n}}
    			}
    		rowLength = isTable.rows[currRow].cells.length;
    		for (i=0; i<rowLength; i++)
    			{if (i != currCell){isTable.rows[currRow].cells[i].className="default"}}
    		for (i=0; i<nRows; i++)
    			{
    			 if (i != currRow)
    				{
    				 nCells = isTable.rows[i].cells.length;
    					for (n=0; n<nCells; n++)
    						{isTable.rows[i].cells[n].className = "default"}
    				}
    			}
    		for (i=0; i<rowLength; i++)
    			{currColor[i] = isTable.rows[currRow].cells[i].className}
    	}
    
    	function init(){
    
    		isTable = document.getElementsByTagName('table')[0];
    		nRows = isTable.rows.length;
    		for (i=1; i<nRows; i++)
    		{	 	
    		         isTable.rows[i].onmouseover = function(){
    			 this.style.cursor = 'pointer';
    			 nCells = this.cells.length;
    			 for(n=0; n<nCells; n++)
    				{
    				 currColor[n] = this.cells[n].className;
    				 if (currColor[n] != "TD_Click")
    				 	{this.cells[n].className='TR_Hover'}
    				}
    						}
    			 isTable.rows[i].onmouseout = function(){
    			 for(n=0; n<nCells; n++)	
    				{this.cells[n].className=currColor[n]}
    						}
    		 }
    		for (i=1; i<nRows; i++)
    			{
    			 nCells = isTable.rows[i].cells.length;
    			 for (n=0; n<nCells; n++)
    				{
    				 isTable.rows[i].cells[n].onclick = function(){
    				 setClickColor(this);
    				 doSomething(this);
    					}
    				}
    			}
    	}
    
    	onload=init;
    
    </script>
    <style type="text/css">
    
    .TR_Hover {background-Color : blue}
    .TD_Click {background-Color : red}
    .default {background-Color : lightyellow}
    
    </Style>
    </Head>
    <Body>
    <Table align='center' bgcolor='lightyellow' border='1' cellspacing='0' cellpadding='5' width='400'>
    <TR>
    <TD width=33%>C1</TD><TD width=33%>C2</TD><TD width=33%>C3</TD>
    </TR>
    <TR>
    <TD id='c1'>One</TD><TD id='c2'>Two</TD><TD id='c3'>Three</TD>
    </TR>
    <TR>
    <TD id='c4'>Four</TD><TD id='c5'>Five</TD><TD id='c5'>Six</TD>
    </TR>
    <TR>
    <TD id='c7'>Seven</TD><TD id='c8'>Eight</TD><TD id='c9'>Nine</TD>
    </TR>
    </Table>
    </Body>
    </html>

  • #13
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I appologize for not being entirely clear with my responses. I understand people on here are volunteering to help out, and I am greatful for all the help.

    The second script helped me get to where I needed to be, and I want to thank you for that. I have figured it out by making a small change.

    Thank you again.

  • #14
    Banned
    Join Date
    Oct 2005
    Location
    I'm in GMT -5
    Posts
    314
    Thanks
    0
    Thanked 1 Time in 1 Post
    mondomon:

    You are very welcome. I believe that too much "help" actually hurts, in the long run. I'm glad you were able to work from one of the examples, to finish your project.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •