473,803 Members | 3,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client side script

Hi,

I have a datagrid with several columns and a single column containing a
checkbox. The grid has some client-side javascript and style sheet that
allows rollover change of row color.

I would like to add client-side script that would allow the user to click on
a row to check the checkbox and change the color of that row with performing
a trip back to my web server.

Any suggestions?

Yama
Nov 18 '05 #1
3 1222
Sorry I meant without performing a trip back to the web server.

"Yama" <yk*****@stbern ard.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

I have a datagrid with several columns and a single column containing a
checkbox. The grid has some client-side javascript and style sheet that
allows rollover change of row color.

I would like to add client-side script that would allow the user to click on a row to check the checkbox and change the color of that row with performing a trip back to my web server.

Any suggestions?

Yama

Nov 18 '05 #2
you can loop up the parentNode element of the checkbox 'til you hit a
row...something like (not tested)

<input type="checkbox" ...onClick="Hig hlightRow(this) ;">

function HighlightRow(ch eckbox){
if (!checkbox) return;
var parent= null;
for (parent= checkbox.parent Node; parent!= null && parent.TagName !=
'TR';parent= parent.parentNo de){}
if (parent != null){
parent.style.ba ckground = (checkbox.check ed) ? '#ff0000' : '#00ff00';
}
}

Karl

"Yama" <yk*****@stbern ard.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

I have a datagrid with several columns and a single column containing a
checkbox. The grid has some client-side javascript and style sheet that
allows rollover change of row color.

I would like to add client-side script that would allow the user to click on a row to check the checkbox and change the color of that row with performing a trip back to my web server.

Any suggestions?

Yama

Nov 18 '05 #3
Yes this is pretty much what I have. What I am trying to accomplish is when
the user clicks anywhere withing that row I want the behavior to select the
row as well as check the checkbox.

Any other suggestions?

Yama

"Karl" <none> wrote in message news:Ok******** ******@TK2MSFTN GP09.phx.gbl...
you can loop up the parentNode element of the checkbox 'til you hit a
row...something like (not tested)

<input type="checkbox" ...onClick="Hig hlightRow(this) ;">

function HighlightRow(ch eckbox){
if (!checkbox) return;
var parent= null;
for (parent= checkbox.parent Node; parent!= null && parent.TagName !=
'TR';parent= parent.parentNo de){}
if (parent != null){
parent.style.ba ckground = (checkbox.check ed) ? '#ff0000' : '#00ff00';
}
}

Karl

"Yama" <yk*****@stbern ard.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

I have a datagrid with several columns and a single column containing a
checkbox. The grid has some client-side javascript and style sheet that
allows rollover change of row color.

I would like to add client-side script that would allow the user to
click on
a row to check the checkbox and change the color of that row with

performing
a trip back to my web server.

Any suggestions?

Yama


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
4342
by: Kathryn | last post by:
Hiya I have a problem with using some client side and server side scripting together in an ASP. I'm using VBScript. What I'm trying to achieve is this - - Page loads up and some server side vbscript reads the database and populates a listbox on the page with the first field from each record in the recordset. This works fine. - User selects an option on the listbox and, using the OnChange, I
5
1977
by: tmb | last post by:
Is there a way to use ASP to 'push' a new image to the client every 15 seconds or so? I guess the entire page will have to be 're-sent' to the client but I'm not sure. I'm trying to 'rotate' a new product image every few seconds. I could use an animated gif or some java script maybe, but I want to keep the file small and not have to count on the user having java script
8
3687
by: Mike Fellows | last post by:
Ok, im not sure if this is at all possible and if it is how i go about it is beyond me i have a piece of client side code that requires a piece of data from the server side (an ID number in this case) how can i pass the data from one side to the other, or retrieve it from the webform on the client side? i hope ive explained this properly
1
1629
by: Carl Jones via .NET 247 | last post by:
(Type your message here) I'm trying to run a client-side script from a web page. It's a VB script that gets information (computer name, software versions etc )about the computer and writes it to a txt file. If I simply run the script from a button click it gathers the information of the server, not the workstation, no matter what workstation I'm on. What am I missing? -------------------------------- From: Carl Jones ...
9
4921
by: Harry Smith | last post by:
While reading the documentation on IsStartupScriptRegistered, there is a reference to "client startup script" as "Determines if the client startup script is registered with the Page object." What is meant by "Client Start Script"? Thanks, Harry
7
1612
by: Mike Rand | last post by:
I am having a really hard time trying to get some client side code hooked up in VS2005, ASP 2.0. The code is in an .inc file (vbscript). The first problem I am encountering is the ASP.NET page doesn't like vbscript and throws fits about the syntax. Second, the page throws fits about the server side code tags (<% ... %>),...are these supported anymore? Third, when I set the onclick event of a client side HTML button it does not recognize...
3
1753
by: jesper_lofgren | last post by:
Hello, I have a problem, i have a event in asp.net codebehind file that updating a datasource. If that update went well i want to refresh my treeview thats on another page. The script works well, the problem is.... the client script runs before the updatemethod ! I give u some ex code here...
1
3167
by: Chris | last post by:
Hi, I have jsut started to learn ASP development and have read many articles regarding which is the best to use regarding JavaScript or VBScript. All of the learning that I have done so far has been using VBScript. I have done the usual database connection and querying stuff using VBScript in my tutorials and have noticed that my code doesnt work when using Mozilla Firefox as VBScript is a Micorsoft language and
5
13124
by: Ankur | last post by:
Hi Folks, I am new for this group. I want to clarify one thing what's a basic difference between Client Side Java Script and Server Side Java Script. how we can differentiate it. Why we called this kind of script "Server Side Java Script". I am in confusion because according to lots of web developer Java Script is a client side scripting language. We can not say it Server Side Java Script.
5
2165
by: Simon | last post by:
I heard that we could do that by using AJAX. Could anybody share how to do it? Thanks.
0
10317
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
10300
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
10069
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
7607
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
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5503
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...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
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
3
2974
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.