Highlight Table Row On Selection?

Jan 22, 2010

I have a php script that lists work shifts in a table I have modified it with a drop down box that jumps to a specific date on selection, what I now want to do is highlight the selected row when its chosen from the drop down box how can I go about doing this? Current javascript present on the page (not written by me).

<script type="text/javascript">
window.onload=function() {
// hide list
var objBM=document.getElementById('bookmarks');
// create dropdown
var container=document.createElement('div');
var sel=document.createElement('select');
objBM.parentNode.insertBefore(container, objBM.nextSibling);
// onchange
sel.onchange=function() {document.location=this.value;};
// fill options
var aBM=objBM.getElementsByTagName('a');
sel.options[0]=new Option('select an option', '');
for(var i=0; i<aBM.length; i++) {
sel.options[i+1]=new Option(aBM[i].firstChild.data, aBM[i].href);

And each row is either:
PHP Code:
echo "<tr id=".$i." style="font-size: $fontsize;" bgcolor=$oddcolor>";
PHP Code:
echo "<tr id=".$i." style="font-size: $fontsize;" bgcolor=$evencolor>";
So each row is given an ID number based on its record number, so it should be as easy as just changing bgcolor of a given id no. But I only want one row highlighted at a time, so if a user selects a new date, the new one will be highlighted only.

View 1 Replies


How To Highlight Php Table Rows?

Jan 29, 2010

I'm working on it since yesterday and no results. I have PHP table automatically generated from mysql database. I'd like to could highlight table rows to other color onMouseOver and OnClick. because I tried Prototype, MooTools etc. and nothing

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


View 2 Replies View Related

How To Highlight Table Cell On MouseDown?

Jul 23, 2005

I have set up an HTML table with clickable cells (the cells contain
only text). They work fine, but I would like to give the user some
visual feedback to indicate that a cell has been clicked. I'd like
this feedback to be the usual highlight on mouseDown, un-highlight
on mouseUp, but I can't figure out how to do it.

View 2 Replies View Related

Highlight And Select Search Results In Table Row?

May 8, 2009

I have a PHP script that searches a database and outputs the results in a table with several TD's. The user can select a radiobutton and press a button to edit that record. I need a JavaScript to do this :

Highlight the entire row when the mouse is over it (using in-line class). Un-highlight when the mouse exits it (in-line class again). Allow the user to select the radio button by clicking anywhere in the row Highlight the selected row (with another in-line class) My scripts endlessly have problems. Below is a small sample from the table...

A non-highlighted row is class "tcell"
a highlighted (mouseover) class is "rhtcell"
a radiobutton selected class is "selcell"
<table align="center" border="0" width="1000" class="stable">
<form method="post" action="index.php">


View 1 Replies View Related

JQuery :: Highlight Table Row And Cell Borders When Hover?

Mar 30, 2011

Is it possible to use jQuery and on any part of a table row that has say 5 cells to highlight the border of each cell?I have seen lots of background examples but haven't seen anything with borders.I tried delegate but that doesn't work.



View 3 Replies View Related

One Highlight A Table Cell As A Result Of Google Search?

Mar 19, 2009

is it possible to highlight a TABLE-CELL instead of the searched word within that cell as a result of a google search.

View 6 Replies View Related

Way To Prevent Tab Text Highlight / Disable Tab Text Selection

Apr 21, 2011

Here's a sample form:

<form action="#" method="post">
Name:<br />


View 3 Replies View Related

Prevent Tab Text Highlight / Disable Tab Text Selection?

Apr 21, 2011

Here's a sample form:

<form action="#" method="post">
Name:<br />
<input type="text" name="name" value="your name" /><br />


When you tab to a text input, the value gets highlighted. How can it be disabled?

View 7 Replies View Related

Possible To Prevent Tab Text Highlight / Disable Tab Text Selection?

Apr 21, 2011

Here's a sample form:

<form action="#" method="post">
Name:<br />
<input type="text" name="name" value="your name" /><br />


View 1 Replies View Related

JQuery :: Use Items In One Table To Highlight Cell Next To Matching Item In Other Tables?

Jan 31, 2011

I have a single-cell table with a bunch of items within divs like item 1 below. The values in the divs are categories.

Following that (item 2 below), I have several single-row, two-column tables where the first column represents a Name (the item I want highlighted) and the second column is one or more of the category items (subset of item 1).

<div class="view-display-id-attachment_1">


This doesn't work and I'm hoping to generalize it but I'm not sure if .field-item-* will work.

View 2 Replies View Related

Highlight Hover Link - Make The 'order' Remain Highlight ?

Jun 5, 2011

Got this below code for a page im working on, what you'll notice is that when you hover over 'order' a sub menu appears,

How do I make the 'order' remain highlight while Im hovering over the sub menus.

View 2 Replies View Related

JQuery :: Different Colors For Table And Row Selection

Aug 24, 2010

I need to make the backgrounds on certain rows a different color to get the info to read better. I used the following:
<!-- Directory of Staff Row Backgrounds -->
<script type="text/javascript">
$(document).ready(function() {
But instead of starting over with a new table it seems to just have counted them all so it looks off. Here is the page: [URL].

View 2 Replies View Related

Show / Hide Table On Selection?

Nov 17, 2011

I got a selection tag which pulls values from DB to populate,i want to hide or show related div/table based on the selection. now i got two confusions. how can i know what is selected coz the option tag value is coming from DB, also i never work with show/hide thingy. how can i achieve it?

View 6 Replies View Related

Display Of Table Based On Drop Down Selection?

Nov 17, 2010

This code is able to display a table and show me state, County, Genus and GenusCount and also it shows when I select option as All for Counties in my drop down. it can based on which it can change my table and give me State, all the Counties, its Genus, GenusCount but when I select a particular County and then select for genus in my drop down menu. It is not working correctly. This is my code.http://paste.flingbits.com/m58f9160Example: If I select `Tennessee->Anderson->All` it should display in tables

|State |County |Genus |


View 1 Replies View Related

Dynamic Table Contents Based Off Selection Box From A Database

Jul 23, 2005

What I'd like to do is have a dropdown box populated with data from a
database. Based on what you select from the drop down a table will be
generated (in this case a 3 column table) from another query to the
database. I will eventually want a way to select one of the rows from
the table, but for now I'd be happy with just generating the table.

I know it will have to deal with DHTML, dom documents, getElementID,
removeNode, recreating the node. What I am not sure about is how to

1) Dynamically create a table
2) Step 1 with data from a database (recordset)

Like I said, I'd also like to be able to select a row from the table.
I'd be happy with making the ros a radio group, though it would be
interesting to be able to select the row. I take it I'd use CSS to
highlight the row selected then.

View 1 Replies View Related

Control A Table Cell Color Based On Menu Selection?

Jul 12, 2010

Just curious if there is a way to control a table cell color based on a menu selection.

I have several colors like Red, Navy, Black, Green, Gold and would like to show a swatch of this selected color beside the menu.

View 4 Replies View Related

What Does Highlight Code Actually Do

Dec 9, 2011

Referring to following link, I get no idea on what the highlight code do, I would like to retrieve the web page using direct URL coding without using function. [URL]
function setFilter(field, value){
var params = {};
params["type"] = "calendar";
params["date"] = "2011-12-06"
$('#calTable').load("/inc/process.php", params, function(data){

View 9 Replies View Related

Highlight Not Working.

Nov 2, 2004

<script type="text/javascript">
function checkForm() {
var vte = document.getElementById("test").value;
if(vte == '') {
<form action="test.php" method="POST">
<input type="text" name="test" value="">
<input type="submit" value="Submit" onClick="checkForm(); return false">

Do you think this will work on all browsers? or at least the major ones?

Alright, the reason for putting InnerHTML in the title is this, if they do not fill out a form correctly, I want to also explain to them what is wrong, so make a text below all the form, or above it that says "The name can not contain numeric characters." etc... I have the highlight working though...

View 1 Replies View Related

How To Highlight A Checked Row?

Apr 4, 2005

I have a table the displays results from a db query using php and mysql. The first column always contains a checkbox, so the user can check if they want this item. I want the checked rows to get higlighted and stay that way while they are checked. I was able to figure out how to highlight the rows on a mouse over but not as they get checked. Anyone have a script to accomplish this.. I'm sure its not too hard but i'm very new to javascript.

View 11 Replies View Related

A-Z Highlight Function

Dec 14, 2005

I want to use a A-Z list page with a search box and when the user types in a search term the words on the A-Z page become highlighted. Doe anyone know how I can using JavaScript to do this? Code:

View 17 Replies View Related

Highlight The Every Instance Of The Same Div?

Jul 6, 2010

I've been searching and playing with this script for the past few hours and finally got it work!

<script type="text/javascript">
function fnSelect(objId)


View 12 Replies View Related

Highlight Text With Javascript

Jul 23, 2005

Is it possible, using Javascript, to highlight (in yellow..) all the occurrences of "number: [0-9]+" (regex) of the document?

View 5 Replies View Related

Highlight Text In Iframe

Oct 20, 2006

On click of a link , the contents get displayed in an iframe. Is there a way to search some text in the content displayed in the iframe and highlight it.

View 1 Replies View Related

OverLib - Highlight Text?

Jul 14, 2007

Is there a way to selectively highlight text in an OverLib popup? I'd
like to be able to make some text stand out from the rest of the text
that is displayed.

I tried using a one-cell table with background set to yellow, but that
caused the popup not to work at all (this might be a syntax problem -
I haven't been able to find any syntax examples for putting a table
inside an OverLib call)

View 5 Replies View Related

JQuery :: Highlight When Click On The Tab

Sep 18, 2010

My question today is involving the accordion. I would really like to get rid of the highlight when I click on the tab, but nothing I have done works so far. I'm not sure of what I should do... this is what I have so far.

View 2 Replies View Related

How To Highlight Checkbox Programmatically

May 26, 2009

A picture says a thousand words. When we hover the cursor over this...we get this. How can I emulate that programatically? I know the <label> highlights the checkboxes in Google Chrome, but it doesn't in Firefox. And I also need it when the cursor is over an image....

View 6 Replies View Related

Copyrights 2005-15 www.BigResource.com, All rights reserved