473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

how to highlight entire row by selecting chekbox

254 100+
hello everyone


How can i use this code in php. please help me with php syntex of the correponding code.

Expand|Select|Wrap|Line Numbers
  1. <tr id=\"TR" + @Text(@DocumentUniqueID) + "\">"
  2. "<td><input name=\"Document\" type=\"checkbox\" onclick=\"highlight(this);\" value=\"" + @Text(@DocumentUniqueID) + "\" /></td>"
  3. <tr id="TR"+ @Text
  4.  
  5. "<tr id=\"TR" + @Text(@DocumentUniqueID) + "\">"
  6.  
  7.  
Expand|Select|Wrap|Line Numbers
  1. <script language="javascript">
  2. function highlight(checkbox) {
  3.    if (document.getElementById) {
  4.       var tr = eval("document.getElementById(\"TR" + checkbox.value + "\")");
  5.    } else {
  6.       return;
  7.    }
  8.    if (tr.style) {
  9.       if (checkbox.checked) {
  10.          tr.style.backgroundColor = "lightgreen";
  11.       } else {
  12.          tr.style.backgroundColor = "white";
  13.       }
  14.    }
  15. }
  16. </script>
  17.  
Nov 17 '07 #1
3 2415
ak1dnar
1,584 Expert 1GB
Php is a Server Side language and Its better to handle such highlighting things in Client Side, So why don't you ask this question "clearly" in the Javasrcript Forum.
Nov 17 '07 #2
mukeshrasm
254 100+
Php is a Server Side language and Its better to handle such highlighting things in Client Side, So why don't you ask this question "clearly" in the Javasrcript Forum.
actually I have generated the table with checkbox at runtime(dynamically) using php. and i wanted to delete this records based on selection made by user from databse.

so how can i do that forgot javascript if you may help me in php.

and thanks for advice. I will put this to javascript forum as well
Nov 17 '07 #3
code green
1,726 Expert 1GB
and i wanted to delete this records based on selection made by user from databse.
I don't see any database inter-action at all.
Delete what records from which database?
Nov 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Gerg | last post by:
The datagrid has a tablestyle applied to it, and there are DataGridTextBoxColumn and each DataGridTextBoxColumn has an array of DataGridTextBox objects. Private Sub highlight(ByVal str As...
3
by: John | last post by:
var tmpelem; tmpelem=document.getElementById("MyTableId"); tmpelem.select(); doesnt work - any ideas how I can get around this? I only want to highlight the table and all child nodes. ...
2
by: KP | last post by:
I want to automatically highlight parts of a webpage (make them standout from the rest of the contents). These parts could be as small as single image tags, and as large as complex tables, parts of...
3
by: Prakash Wadhwani | last post by:
Is there any EASY way to highlight a full row in a continuous form so that as i navigate up & down the table/continuous form using the arrow keys, the entire line (all fields) get highlighted ? ...
6
by: LU | last post by:
A)I build a datagrid based on a calendar date selection. B)When user clicks a button column on the datagrid I want to highlight this row. I use the code below to highlight the row. ***** CODE...
2
by: Carl Gilbert | last post by:
Hi I have a Treeview component on a form which when loaded selects a node from the treeview. The problem is that I can not get the node to remain highlighted. The app is sucessfully...
5
by: marfi95 | last post by:
I'm very confused. I'm trying to automatically select the text when my textbox gets the focus. This is typically when the user has clicked the mouse in the field. This is the code I have in...
0
by: rdemyan via AccessMonster.com | last post by:
I have a need to highlight a date range in a bar chart. If the "highlighting" is accomplished by changing the bar column color for the specific months in the date range, that would be great. ...
5
by: Randy | last post by:
Based on the date that the user selects, I'm trying to make the MonthCalendar control highlight the entire week. In my case, the week is from Monday - Sunday. I thought that using AddBoldedDate...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.