473,788 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to highlight entire row by selecting chekbox

254 Contributor
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 2428
ak1dnar
1,584 Recognized Expert Top Contributor
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 Contributor
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(dynamic ally) 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 Recognized Expert Top Contributor
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
5015
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 String) Dim myTextBoxcolumn As DataGridTextBoxColumn Dim myTextBox As DataGridTextBox 'loop through the cells of the datagrid, searching for the string
3
2053
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. Thanks! J
2
8455
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 tables etc. What is guaranteed, however, is that the part to be highlighted will always be a complete block. Ideally I would like to is insert a single html tag around this block so that the contents of the block will standout on the page. I...
3
15852
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 ? This will give the effect of a bar moving up & down. BTW, all fields are locked so this form is View-Only & not editable. Thx & Best Rgds, Prakash.
6
3443
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 TO HIGHLIGHT ROW Sub Datagrid_ItemCommand(ByVal s As Object, ByVal e As DataGridCommandEventArgs) If e.CommandName = "ViewUnitRequest" Then e.Item.BackColor = System.Drawing.Color.LightGray
2
2608
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 selecting the node as the correct parent node expands and when I click on the parent, the node that I set on the load breifly highlights before the parent is highlighted.
5
7316
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 the Text1_GotFocus event: Text1.SelectionStart = 0 Text1.SelectionLength = Text1.Text.Length However, the text does not get highlighted. It appears to be the
0
1447
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. Here's an example: I'm plotting meter usage against dates on the chart. The dates are typically the first day of the month. So assume the chart range is 1/1/2000 through 10/31/06, but for the date
5
8733
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 along with selectionrange.start and .end would accomplish this, but it doesn't. Here is my code: Private Sub MonthCalendar1_DateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7519
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.